Commit Graph

2024 Commits

Author SHA1 Message Date
Simon Glass
972188b3a8 x86: Use X86_16BIT_INIT instead of X86_RESET_VECTOR
Use this new option to control the location of 16-bit init. This will allow
us to place this in SPL if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Mario Six
a1b6b0a9c1 arm: mvebu: Implement secure boot
The patch implements secure booting for the mvebu architecture.

This includes:
- The addition of secure headers and all needed signatures and keys in
  mkimage
- Commands capable of writing the board's efuses to both write the
  needed cryptographic data and enable the secure booting mechanism
- The creation of convenience text files containing the necessary
  commands to write the efuses

The KAK and CSK keys are expected to reside in the files kwb_kak.key and
kwb_csk.key (OpenSSL 2048 bit private keys) in the top-level directory.

Signed-off-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2017-02-01 09:04:18 +01:00
Tom Rini
794c6e2c96 Prepare v2017.03-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-30 19:05:43 -05:00
Tom Rini
a705ebc81b Prepare v2017.01
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-09 11:57:05 -05:00
Tom Rini
87f5f5417f Prepare v2017.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-02 20:00:55 -05:00
Sven Ebenfeld
1f6a664802 Makefile: preserve output for images that can contain HAB Blocks
To being able to sign created binaries, we need to know the HAB Blocks
for that image. Especially for the imximage type the HAB Blocks are
only available during creation of the image. We want to preserve the
information until we get to sign the files.
In the verbose case we still get them printed out instead of writing
to log files.

Cc: sbabic@denx.de

v2-Changes:
 - No usage of MKIMAGEOUTPUT_$(@F) macro.
 - Predefine default value /dev/null in every involved Makefile.

Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
2017-01-02 17:07:39 +01:00
Sven Ebenfeld
d21bd69b6e tools: mkimage: add firmware-ivt image type for HAB verification
When we want to use Secure Boot with HAB from SPL over U-Boot.img,
we need to append the IVT to the image and leave space for the CSF.
Images generated as firmware_ivt can directly be signed using the
Freescale code signing tool. For creation of a CSF, mkimage outputs
the correct HAB Blocks for the image.
The changes to the usual firmware image class are quite small,
that is why I implemented that directly into the default_image.

Cc: sbabic@denx.de

v2-Changes: None

Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
2017-01-02 17:06:57 +01:00
Tom Rini
36737f22b7 Merge git://git.denx.de/u-boot-dm 2016-12-20 08:42:04 -05:00
Tom Rini
4cf5c5f1e6 Prepare v2017.01-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-12-19 16:08:57 -05:00
Simon Glass
b215fbd868 x86: Use binman all x86 boards
Change x86 boards to use binman to produce the ROM. This involves adding the
image definition to the device tree and using it in the Makefile. The
existing ifdtool features are no-longer needed.

Note that the u-boot.dtsi file is common and is used for all x86 boards which
use microcode. A separate emulation-u-boot-dtsi is used for the others.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2016-12-20 08:09:55 +13:00
Simon Glass
61b994a386 sunxi: Use binman for sunxi boards
Move sunxi boards to use binman. This involves adding the image definition
to the device tree and using it in the Makefile.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-20 08:09:55 +13:00
Simon Glass
17a944b671 binman: Add a build rule for binman
Add a standard command definition for binman so that it can be used in
makefiles.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2016-12-20 08:09:55 +13:00
Tom Rini
3cfb67d041 Prepare v2017.01-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-12-05 18:36:23 -05:00
Simon Glass
1bd876301b Makefile: Add a target to create the .cfg files
A common requirement when converting CONFIG options to Kconfig is to check
that the effective configuration has not changed due to the conversion. Add
a target which creates this configuration (in the form of u-boot.cfg) but
does not build U-Boot. This speeds up the checking.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Simon Glass
2dcd4e9ee1 x86: Move efi .S files into the 'lib' directory
These files now need to be in a standard place so that they can be located
by generic Makefile rules. Move them to the 'lib' directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2016-11-14 23:24:04 +01:00
Simon Glass
bb1ae55948 efi: Makefile: Export variables for use with EFI
When building an EFI app we need three things:

   - start-up code
   - relocation code
   - link script

These are all different for each architecture. We also need special
compiler flags in some cases.

Add top-level Makefile variables for these along with documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2016-11-14 23:24:03 +01:00
Tom Rini
29e0cfb4f7 Prepare v2016.11
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-11-14 11:27:11 -05:00
Tom Rini
d8bdfc80da Prepare v2016.11-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-10-31 16:36:10 -04:00
Jagan Teki
aec9a0f19f sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXI
CONFIG_SUNXI -> CONFIG_ARCH_SUNXI
and removed CONFIG_SUNIX from config_whitelist.txt

Cc: Simon Glass <sjg@chromium.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-10-30 11:38:04 +01:00
Tom Rini
d5a815327d Prepare v2016.11-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-10-17 20:09:33 -04:00
Tom Rini
f5fd45ff64 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2016-10-08 09:33:37 -04:00
Masahiro Yamada
e19b0fb485 kbuild: generate u-boot.cfg as a byproduct of include/autoconf.mk
Our build system still parses ad-hoc CONFIG options in header files
and generates include/autoconf.mk so that Makefiles can reference
them.  This gimmick was introduced in the pre-Kconfig days and will
be kept until Kconfig migration is completed.

The include/autoconf.mk is generated like follows:

  [1] Preprocess include/common.h with -DDO_DEPS_ONLY and
      retrieve macros into include/autoconf.mk.tmp
  [2] Reformat include/autoconf.mk.dep into include/autoconf.mk
      with tools/scripts/define2mk.sed script
  [3] Remove include/autoconf.mk.tmp

Here, include/autoconf.mk.tmp is similar to u-boot.cfg, which is
also generated by preprocessing include/config.h with -DDO_DEPS_ONLY.
In other words, there is much overlap among include/autoconf.mk and
u-boot.cfg build rules.

So, the idea is to split the build rule of include/autoconf.mk
into two stages.  The first preprocesses headers into u-boot.cfg.
The second parses the u-boot.cfg into include/autoconf.mk.  The
build rules of u-boot.cfg in Makefile and spl/Makefile will be gone.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-07 14:26:34 +00:00
Masahiro Yamada
4bf06d11c3 kbuild: move no_new_adhoc_configs_check to "all" target command
I am going to move the build rule of u-boot.cfg.  Before that,
no_new_adhoc_configs_check must be tweaked to not depend on it.

The ad-hoc option check can be done at the end of build, along
with other checks.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-07 14:26:32 +00:00
Albert ARIBAUD \(3ADEV\)
ed0c2c0a9e tools: mkimage: add support for Vybrid image format
This format can be flashed directly at address 0 of
the NAND FLASH, as it contains all necessary headers.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
2016-10-06 09:06:16 +02:00
Tom Rini
53fec16206 Prepare v2016.11-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-10-03 09:28:13 -04:00
Tom Rini
cbe7706ab8 Merge git://git.denx.de/u-boot-fsl-qoriq
trini: Drop local memset() from
examples/standalone/mem_to_mem_idma2intr.c

Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-26 17:10:56 -04:00
Stephen Warren
a6c1309782 Makefile: rm u-boot.cfg dependencies are missing
Prior to the previous patch, a freshly created .u-boot.cfg.cmd may not
correctly represent all dependencies for u-boot.cfg. The previous change
only solved this issue for fresh builds; when performing an incremental
build, the deficient .u-boot.cfg.cmd is already present, so u-boot.cfg
is not rebuilt, and hence .u-boot.cfg.cmd is not rebuilt with the correct
content.

Solve this by explicitly detecting when the dependency file .u-boot.cfg.d
has not been integrated into .u-boot.cfg.cmd, and force u-boot.cfg to be
rebuilt in this case by deleting it first. This is possible since
if_changed_dep will always delete .u-boot.cfg.d when it executes
successfully, so its presence means either that the previous build was
made by a source tree that contained a Makefile that didn't include the
previous patch, or that the build failed part way through executing
if_changed_dep for u-boot.cfg. Forcing a rebuild of u-boot.cfg is required
in the former case, and will cause no additional work in the latter case,
since the file would be rebuilt anyway for the same reason it was being
rebuilt by the previous build.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2016-09-22 11:34:59 -04:00
Stephen Warren
fcd29a4d0e Makefile: use if_change_dep for u-boot.cfg
cmd_cpp_cfg generates a dependency output, but because it's invoked using
if_changed rather than if_changed_dep, that dependency file is ignored.
This results in Kbuild not knowing about which files u-boot.cfg depends
on, so it may not be rebuilt when required.

A practical result of this is that u-boot.cfg may continue to reference
CONFIG_ options that no longer exist in the source tree, and this can
cause the adhoc config options check to fail.

This change modifies Makefile to use if_changed_dep, which in turn causes
all dependencies to be known to the next make invocation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2016-09-22 11:34:59 -04:00
Simon Glass
371244cb19 Makefile: Give a build error if ad-hoc CONFIG options are added
New CONFIG options should be added via Kconfig. To help prevent new ad-hoc
CONFIGs from being added, give a build error when these are detected.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2016-09-16 17:27:24 -04:00
Shengzhou Liu
b9e745bbe2 driver/ddr/fsl: Add general MMDC driver and reuse common MMDC driver for ls1012a
This general MMDC driver adds basic support for Freescale MMDC
(Multi Mode DDR Controller). Currently MMDC is integrated on ARMv8
LS1012A SoC for DDR3L, there will be a update to this driver to
support more flexible configuration if new features (DDR4, multiple
controllers/chip selections, etc) are implimented in future.

Meantime, reuse common MMDC driver for LS1012ARDB/LS1012AQDS/
LS1012AFRDM.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-09-14 14:08:22 -07:00
Tom Rini
8cbb389bb3 Prepare v2016.09
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-12 10:05:51 -04:00
Tom Rini
1d3bcb66ee Prepare v2016.09-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-08-22 20:30:42 -04:00
Vignesh R
68a2fd4357 Makefile: Remove tags file on mrproper
make tags creates a symbolic link called tags to ctags. Remove this file
on make mrproper or make distclean.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-20 14:03:27 -04:00
Maxime Ripard
f2a9942fbc tests: Introduce DT overlay tests
This adds a bunch of unit tests for the "fdt apply" command.

They've all been run successfully in the sandbox. However, as you still
require an out-of-tree dtc with overlay support, this is disabled by
default.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-08-20 11:35:07 -04:00
Chris Zankel
de5e5cea02 xtensa: add support for the xtensa processor architecture [1/2]
The Xtensa processor architecture is a configurable, extensible,
and synthesizable 32-bit RISC processor core provided by Cadence.

This is the first part of the basic architecture port with changes to
common files. The 'arch/xtensa' directory, and boards and additional
drivers will be in separate commits.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-15 18:46:38 -04:00
Simon Glass
633cc7ae96 Makefile: Allow 'make tests' to run tests
Add this shortcut for running tests. Unfortunately 'make test' cannot be
used as it is an existing directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Teddy Reed <teddy.reed@gmail.com>
2016-08-05 20:55:18 -04:00
Stephen Warren
61f5ddcb7a Add a power domain framework/uclass
Many SoCs allow power to be applied to or removed from portions of the SoC
(power domains). This may be used to save power. This API provides the
means to control such power management hardware.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-07-27 16:29:56 -06:00
Tom Rini
4579720412 Prepare v2016.09-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-07-25 22:25:52 -04:00
Tom Rini
ebe621d5fb Merge git://git.denx.de/u-boot-dm 2016-07-15 08:06:22 -04:00
Simon Glass
054b3a1e80 dm: Makefile: Build of-platdata before SPL
Since SPL needs the of-platdata structures, build these before starting
to build any SPL components.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-07-14 20:40:24 -06:00
Simon Glass
7fcdac0ee9 sandbox: Don't print a warning for CONFIG_I2C_COMPAT
Sandbox includes this code to provide build coverage. While we retain this
feature we should have sandbox build it. Sandbox does not in fact use the
I2C compatibility mode. Showing a warning for sandbox is just confusing,
since no conversion is expected.

Drop the warning for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-07-14 20:40:24 -06:00
Simon Glass
022885cb9c tools: Allow building with debug enabled
Sometimes it is useful to build tools with debugging information included so
that line-number information is available when run under gdb. Add a Kconfig
option to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-07-14 18:22:31 -04:00
Tom Rini
19ce924ff9 Prepare v2016.07
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-07-11 15:01:01 -04:00
Tom Rini
0e1e587ff4 Prepare v2016.07-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-07-01 17:43:17 -04:00
Masahiro Yamada
4141e85bcd kbuild: avoid race between dtbs and dt/dt.dtb targets
If the final targets depend on both "dtbs" and "dts/dt.dtb",
and -j option is given to the command line, multiple threads
descend into the dts/ directory, which causes build error.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Andreas Dannenberg <dannenberg@ti.com>
2016-06-24 17:24:41 -04:00
Vagrant Cascadian
42ffa51fd4 Use C locale when setting CC_VERSION_STRING and LD_VERSION_STRING.
The output reported may be locale-dependent, which results in
unreproducible builds.

  $ LANG=C ld --version | head -n 1
    GNU ld (GNU Binutils for Debian) 2.26

  $ LANG=it_CH.UTF-8 ld --version | head -n 1
    ld di GNU (GNU Binutils for Debian) 2.26

Forcing LC_ALL=C ensures the output is consistant regardless of the
build environment.

Thanks to HW42 for debugging the issue:

  https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20160606/005722.html

For more information about reproducible builds:

  https://reproducible-builds.org/

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-24 17:23:10 -04:00
Tom Rini
46fd625dfe Prepare v2016.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-06-20 11:14:12 -04:00
Tom Rini
b104b3dc1d Prepare v2016.07-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-06-06 17:43:54 -04:00
Simon Glass
89b199c3d4 Remove/update old generic-board documentation and warning
Remove the warning from the Makefile, since boards that do not use generic
board will no longer build. Also update documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-27 15:39:50 -04:00
Bin Meng
0fbdaa0e07 acpi: Clean IASL generated intermediate files
For boards that support ACPI, there are dsdt.aml, dsdt.asl.tmp and
dsdt.c in the board directory after a successful build. These are
intermediate files generated by IASL, and should be removed during
a 'make clean'.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23 15:18:00 +08:00
Tom Rini
aeaec0e682 Prepare v2016.05
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-05-16 10:40:32 -04:00
Andreas Bießmann
7a439cadcf mkimage: fix argument parsing on BSD systems
The getopt(3) optstring '-' is a GNU extension which is not available on BSD
systems like OS X.

Remove this dependency by implementing argument parsing in another way. This
will also change the lately introduced '-b' switch behaviour.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-02 18:37:09 -04:00
Tom Rini
a398e7aa21 Prepare v2016.05-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-04-25 19:27:37 -04:00
Tom Rini
ee8b25fa35 Prepare v2016.05-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-04-21 09:37:33 -04:00
Tom Rini
bbf8bef196 Prepare v2016.05-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-04-11 22:22:25 -04:00
Sriram Dash
93eb8f39d2 drivers:usb:common:fsl-dt-fixup: Move device-tree fixup framework to common file
Move usb device-tree fixup framework from ehci-fsl.c to common place so
that it can be used by other drivers as well (xhci-fsl.c).

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@nxp.com>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Acked-by: Marek Vasut <marex@denx.de>
2016-04-10 17:18:42 +02:00
Tom Rini
8a7367acca cmd: Fix license command
The license command isn't usually built and has a few problems:
- The rules to generate license.h haven't worked in a long time,
  re-write these based on the bmp_logo.h rules.
- 'tok' is unused and the license text size has increased
- bin2header.c wasn't grabbing unistd.h to know the prototype for
  read().

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:13 -04:00
Simon Glass
0adf8d3548 x86: Add support for running Intel reference code
Intel has invented yet another binary blob which firmware is required to
run. This is run after SDRAM is ready. It is linked to load at a particular
address, typically 0, but is a relocatable ELF so can be moved if required.

Add support for this in the build system. The file should be placed in the
board directory, and called refcode.elf.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-03-17 10:27:25 +08:00
Simon Glass
cdf172461c spl: Add a way to specify a list of device trees to include
When building a FIT, more than one device tree can be included. The board
can select (at run-time) the one that it wants.

Add a Kconfig option to allow the list of devices trees (supported by the
board) to be specified.

When using SPL_LOAD_FIT, build u-boot.img in FIT format instead of the
legacy image format. Include all the listed device tree files in this FIT.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14 19:18:31 -04:00
Tom Rini
df61a74e68 Prepare v2016.03
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-14 10:20:21 -04:00
Tom Rini
0156782feb Prepare v2016.03-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-02-29 17:44:13 -05:00
Tom Rini
727a25b241 Prepare v2016.03-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-02-15 21:44:30 +00:00
Stephen Warren
7ed4848bb8 Makefile: generate symbol list from u-boot
This information may be useful for both debugging, and processes that want
to perform simple forms of introspection on the U-Boot binary, such as
determining the set of "ut" subtests that are compiled in.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-02-15 20:58:26 +00:00
Stephen Warren
15b51878be Makefile: remove BUILD_TAG from KBUILD_CFLAGS
If BUILD_TAG is part of KBUILD_CFLAGS, then any time the value changes,
all files get rebuilt. In a continuous integration environment, the value
will change every build. This wastes time, assuming that incremental
builds would otherwise occur.

To solve this, remove BUILD_TAG from KBUILD_CFLAGS and add it to CFLAGS
for just the one file that uses it. This does have the disadvantage that
if any other files want to use the flag, we'll need to duplicate this
custom CFLAGS setup logic. However, it seems unlikely we'll need this.

An alternative would be to add BUILD_TAG to the "local version" and remove
the special case code from display_options.c. However, that would affect
the format of the U-Boot signon message, which may negatively affect
people looking for specific data there. The approach of using
file-specific CFLAGS was suggested by Masahiro Yamada.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-02-15 12:04:47 -05:00
Masahiro Yamada
514ec43892 kbuild: add missing FORCE where $(call if_changed, ) is used
FORCE is needed for $(call if_changed,...) to be evaluated every time.
Otherwise, the command is not executed when the command line has
changed but any prerequisite has not been updated.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-02-08 10:22:41 -05:00
Tom Rini
44189a0328 Prepare v2016.03-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-02-02 11:29:50 -05:00
Simon Glass
73c5c39997 Makefile: Drop unnecessary -dtb suffixes
When OF_CONTROL is enabled, u-boot-dtb.* files are the same as u-boot.*
files. So we can use the latter for simplicity.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-01 20:55:52 -05:00
Simon Glass
dae6e7bf50 Makefile: Make u-boot.img the same as u-boot-dtb.img
Create u-boot.img even when OF_CONTROL is enabled, so that this file can be
used in both cases.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-01 20:55:50 -05:00
Simon Glass
bd7dc3883b socfpga: Simplify Makefile filenames
We don't need the -dtb suffix anymore, so drop it.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-01 20:55:48 -05:00
Simon Glass
a9d78260a8 tegra: Always build a boot image with the same filename
Adjust the Makefile to build u-boot-tegra.bin which contains a device tree
if OF_SEPARATE is enabled, and does not if not. This mirrors U-Boot's new
approach of using u-boot.bin to handle both cases.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-01 20:55:43 -05:00
Simon Glass
ad1ecd2063 fdt: Build a U-Boot binary without device tree
At present u-boot.bin holds the plain U-Boot binary without the device tree.
This is somewhat annoying since you need either u-boot.bin or u-boot-dtb.bin
depending on whether device tree is used.

Adjust the build such that u-boot.bin includes a device tree (if enabled),
and the plain binary is in u-boot-nodtb.bin. For now u-boot-dtb.bin remains
the same.

This should be acceptable since:

- without OF_CONTROL, u-boot.bin still does not include a device tree
- with OF_CONTROL, u-boot-dtb.bin does not change

The main impact is build systems which are set up to use u-boot.bin as
the output file and then add a device tree. These will have to change to use
u-boot-nodtb.bin instead.

Adjust tegra rules so it continues to produce the correct files.

Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-01 20:55:32 -05:00
Simon Glass
580cc03312 tegra: Clarify generation of -nodtb file with OF_CONTROL
Fix the ALL-y logic in the Makefile so that is clear that we always want
the -nodtb file.

Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-01 20:55:13 -05:00
Simon Glass
72a8cf8dcc Move all command code into its own directory
There are a lot of unrelated files in common, including all of the commands.
Moving them into their own directory makes them easier to find and is more
logical.

Some commands include non-command code, such as cmd_scsi.c. This should be
sorted out at some point so that the function can be enabled with or without
the associated command.

Unfortunately, with m68k I get this error:

m68k:  +   M5329AFEE
+arch/m68k/cpu/mcf532x/start.o: In function `_start':
+arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o

I hope someone can shed some light on what this means. I hope it isn't
depending on the position of code in the image.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
2016-01-25 10:39:43 -05:00
Masahiro Yamada
8b7fb78d48 kbuild: drop workaround for old style CONFIG_SYS_TEXT_BASE defines
Now, there is no board defining CONFIG_SYS_TEXT_BASE by its config.mk,
so this workaround is no longer needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stefan Roese <sr@denx.de>
2016-01-20 10:19:37 -05:00
Stefan Roese
f4db6c976c arm: mvebu: Add runtime detection of UART (xmodem) boot-mode
This patch adds runtime detection of the Marvell UART boot-mode (xmodem
protocol). If this boot-mode is detected, SPL will return to the
BootROM to continue the UART booting.

With this patch its now possible, to generate a U-Boot image that
can be booted either from the strapped boot-device (e.g. SPI NOR, MMC,
etc) or via the xmodem protocol from the UART. In the UART case,
the kwboot tool will dynamically insert the UART boot-device type
into the image. And also patch the load address in the header, so
that the mkimage header will be skipped (as its not expected by the
Marvell BootROM).

This simplifies the development for Armada XP / 38x based boards.
As no special images need to be generated by selecting the
MVEBU_BOOTROM_UARTBOOT Kconfig option.

Since the Kconfig option MVEBU_BOOTROM_UARTBOOT is not needed any
more, its now completely removed.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
2016-01-14 14:08:59 +01:00
Tom Rini
fa85e826c1 Prepare v2016.01
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-01-12 09:06:54 -05:00
Aneesh Bansal
c2b233cbec arm, Makefile: correct compilation flag for u-boot-dtb
The compilation of u-boot-dtb.img should be controlled by
CONFIG_OF_CONTROL and not CONFIG_DM.
CONFIG_DM may be defined even without Device Tree requirement.

This was added in commit 947cee1127.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
2016-01-08 10:15:43 -05:00
Tom Rini
7cd1a1235b Prepare v2016.01-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-01-04 16:37:15 -05:00
Tom Rini
f84c2b665b Prepare v2016.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-12-21 21:07:04 -05:00
Tom Rini
8356431bf8 Prepare v2016.01-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-12-07 14:23:45 -05:00
Nathan Rossi
08598d6ee9 ARM: zynq: Add target for building bootable SPL image for Zynq
Add a build target to generate 'boot.bin' which includes SPL. This is
used by the platforms BootROM to load SPL directly.

This change also conditionally changes what the 'boot.bin' target
generates depending on the SoC. Leaving the behaviour unchanged for the
AT91 targets.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-19 13:09:21 +01:00
Tom Rini
3d4825446e Prepare v2016.01-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-16 20:29:51 -05:00
Tom Rini
cad0499071 Merge branch 'master' of git://git.denx.de/u-boot-arm 2015-11-10 13:38:08 -05:00
Tom Rini
da58dec866 Various Makefiles: Add SPDX-License-Identifier tags
After consulting with some of the SPDX team, the conclusion is that
Makefiles are worth adding SPDX-License-Identifier tags too, and most of
ours have one.  This adds tags to ones that lack them and converts a few
that had full (or in one case, very partial) license blobs into the
equivalent tag.

Cc: Kate Stewart <kstewart@linuxfoundation.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-10 09:19:52 -05:00
Albert ARIBAUD
62e92077a8 arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD
When building a Thumb-1-only target with CONFIG_SYS_THUMB_BUILD,
some files fail to build, most of the time because they include
mcr instructions, which only exist for Thumb-2.

This patch introduces a Kconfig option CONFIG_THUMB2 and uses
it to select between Thumb-2 and ARM mode for the aforementioned
files.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2015-11-10 15:03:48 +01:00
Alison Wang
947cee1127 arm: ls1021a: Add QSPI or IFC support in SD boot
As QSPI and IFC are pin-multiplexed on LS1021A, only IFC is supported in
SD boot now. For the customer's demand, QSPI needs to be supported in SD
boot too.

This patch adds QSPI or IFC support in SD boot according to the
corresponding defconfig. For detail, ls1021atwr_sdcard_ifc_defconfig is
used to support IFC in SD boot and ls1021atwr_sdcard_qspi_defconfig is
used to support QSPI in SD boot.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-10-26 09:09:57 -07:00
Tom Rini
858dbdf841 Merge git://git.denx.de/u-boot-x86 2015-10-21 20:47:40 -04:00
Bin Meng
a34b46768f Makefile: Generate U_BOOT_DMI_DATE for SMBIOS
Add U_BOOT_DMI_DATE (format mm/dd/yyyy) generation to be used by
SMBIOS tables, as required by SMBIOS spec 3.0 [1]. See chapter 7.1,
BIOS information structure offset 08h for details.

[1] http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-10-21 07:46:26 -06:00
Stefan Roese
9cffb2335c arm: mvebu: Add DM (driver model) support
This patch adds driver model support for some Marvell MVEBU SoC's. Including
Armada XP and 38x. All 3 currently mainlined boards are converted. DM is now
selected automatically for MVEBU platforms.

With this DM support now available for MVEBU, hardcoding the base addresses
and other information is not necessary any more. Probing should be done
by using the values provided via the device tree now instead. For this
the driver also need to be converted to DM. Patches for some of the drivers
will follow.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-10-21 02:25:01 +02:00
Stefan Roese
944c7a3176 arm: mvebu: Add option to use UART xmodem protocol via kwboot
This patch enables the use of the kwboot tool, to boot mainline U-Boot
on the Marvell Armada XP/38x SoC's. This is done by returning to the
SoC's BootROM after SPL has initialized the SDRAM. We need to make sure
to not reconfigure the internal register space and MBARs. Otherwise
the BootROM will not be able to continue after SPL jumps back to it.

To use this feature, please don't forget to change the BOOT_FROM line
in your board specfic kwbimage.cfg file this way:

    BOOT_FROM uart

Tested on these Marvell eval boards:
DB-MV784MP-GP - Armada XP
DB-88F6820-GP - Armada 38x

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-10-21 02:25:00 +02:00
Tom Rini
5ec0003b19 Prepare v2015.10
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-10-19 19:59:38 -04:00
Tom Rini
87a9595709 Prepare v2015.10-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-10-12 11:14:27 -04:00
Tom Rini
1f8836396d Prepare v2015.10-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-09-28 16:57:42 -04:00
Tom Rini
efde6a579f Prepare v2015.10-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-09-07 08:56:35 -04:00
Andreas Bießmann
2d9efa1227 Makefile: fix SOURCE_DATE_EPOCH for *BSD host
The SOURCE_DATE_EPOCH mechanism for reproducible builds require some date(1)
with -d switch to print the relevant date and time strings of another point of
time.

In other words it requires some date(1) that behaves like the GNU date(1) [1].
The BSD date(1) [2] on the other hand has the same switch but with a different
meaning.

Respect this and check the date(1) abilities before usage, error on non
working version.  Use the well known pre- and suffixes for the GNU variant of
a tool on *BSD hosts to search for a working date(1) version.

[1] http://man7.org/linux/man-pages/man1/date.1.html [2]
http://www.freebsd.org/cgi/man.cgi?query=date

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2015-08-28 12:33:19 -04:00
Nishanth Menon
cd43ddc019 ARM: keystone2: move the custom build rules out to keystone specific makefile
Keystone has build rules introduced by commit ef509b9063 ("k2hk: add
support for k2hk SOC and EVM") and commit 0e7f2dbac6 ("keystone: add
support for NAND gpheader image").

These are not reused by other platforms for the build, hence there is no
clear benefit is maintaining them in the generic makefile as a build
target. move these to the keystone specific make option

Original idea of using config.mk by Lokesh Vutla <lokeshvutla@ti.com>

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2015-08-28 12:33:15 -04:00
Chris Packham
70d39f5714 Makefile: Use correct timezone for U_BOOT_TZ
When building with SOURCE_DATE_EPOCH the timezone is in UTC. When
building normally the timezone is taken from the build machine's locale
setting.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
2015-08-28 12:33:12 -04:00
Simon Glass
b098032387 x86: ifdtool: Support collating microcode into one place
The Intel Firmware Support Package (FSP) requires that microcode be provided
very early before the device tree can be scanned. We already support adding
a pointer to the microcode data in a place where early init code can access.

However this just points into the device tree and can only point to a single
lot of microcode. For boards which may have different CPU types we must
support multiple microcodes and pass all of them to the FSP in one place.

Enhance ifdtool to scan all the microcode, place it together in the ROM and
update the microcode pointer to point there. This allows us to pass multiple
microcode blocks to the FSP using its existing API.

Enable the flag in the Makefile so that this feature is used by default for
all boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-26 07:54:10 -07:00
Tom Rini
0d339cf9a9 Prepare v2015.10-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-08-17 17:32:23 -04:00
Marek Vasut
333b7209ed Makefile: Add target for building bootable SPL image for SoCFPGA
Add build target for generating boot partition images recognised by
the SoCFPGA BootROM. The SoCFPGA BootROM expects four copies of the
u-boot-spl-dtb.sfp at the beginning of boot partition. Those are
u-boot-spl-dtb.bin augmented by a header with which the BootROM can
work. The u-boot-dtb.img uImage is appended to this to produce a
full boot partition image, the u-boot-with-spl-dtb.sfp . This is
the name of the final target.

Signed-off-by: Marek Vasut <marex@denx.de>
2015-08-08 14:14:10 +02:00
Dinh Nguyen
9bbd2132e3 driver/ddr/altera: Add DDR driver for Altera's SDRAM controller
This patch enables the SDRAM controller that is used on Altera's SoCFPGA
family. This patch configures the SDRAM controller based on a configuration
file that is generated from the Quartus tool, sdram_config.h.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-08-08 14:14:05 +02:00
Simon Glass
96a8d409a7 efi: Add 64-bit payload support
Most EFI implementations use 64-bit. Add a way to build U-Boot as a 64-bit
EFI payload. The payload unpacks a (32-bit) U-Boot and starts it. This can
be enabled for x86 boards at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Improvements to how the payload is built:
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05 08:44:07 -06:00
Simon Glass
476476e73b efi: Add support for loading U-Boot through an EFI stub
It is useful to be able to load U-Boot onto a board even if is it already
running EFI. This can allow access to the U-Boot command interface, flexible
booting options and easier development.

The easiest way to do this is to build U-Boot as a binary blob and have an
EFI stub copy it into RAM. Add support for this feature, targeting 32-bit
initially.

Also add a way to detect when U-Boot has been loaded via a stub. This goes
in common.h since it needs to be widely available so that we avoid redoing
initialisation that should be skipped.

Signed-off-by: Simon Glass <sjg@chromium.org>
Improvements to how the payload is built:
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05 08:44:06 -06:00
Simon Glass
08aeb8b5fe efi: Support building a u-boot-app.efi executable
Add support for building U-Boot as an EFI application with a .efi suffix.
This can be loaded by EFI provided that EFI has the same bit width (32-
or 64-bit) as U-Boot. This unfortunate limitation is imposed by EFI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05 08:44:05 -06:00
Simon Glass
e020c88a3c Allow objcopy to work without filling gaps with 0xff
This is currently done for all targets, since 0xff is the default erased
value for most flash devices. In some cases this is not what we want (e.g.
for EFI images) so provide a command to do a vanilla objcopy.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05 08:42:40 -06:00
Tom Rini
c109dd0079 Prepare v2015.10-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-08-03 10:52:14 -04:00
Tom Rini
8968b914be Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2015-07-31 20:16:21 -04:00
Aneesh Bansal
467a40dfe3 powerpc/mpc85xx: SECURE BOOT- NAND secure boot target for P3041
Secure Boot Target is added for NAND for P3041.
For mpc85xx SoCs, the core begins execution from address 0xFFFFFFFC.
In case of secure boot, this default address maps to Boot ROM.
The Boot ROM code requires that the bootloader(U-boot) must lie
in 0 to 3.5G address space i.e. 0x0 - 0xDFFFFFFF.

In case of NAND Secure Boot, CONFIG_SYS_RAMBOOT is enabled and CPC is
configured as SRAM. U-Boot binary will be located on SRAM configured
at address 0xBFF00000.
In the U-Boot code, TLB entries are created to map the virtual address
0xFFF00000 to physical address 0xBFF00000 of CPC configured as SRAM.

Signed-off-by: Saksham Jain <saksham@freescale.com>
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-07-31 08:50:18 -07:00
Paul Kocialkowski
f3f431a712 Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
In order to achieve reproducible builds in U-Boot, timestamps that are defined
at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH environment
variable allows setting a fixed value for those timestamps.

Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets can be
built reproducibly. This is the case for e.g. sunxi devices.

However, some other devices might need some more tweaks, especially regarding
the image generation tools.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-27 15:03:14 -04:00
Masahiro Yamada
4d713be139 kbuild: use relative path more to include Makefile
Prior to this commit, it was impossible to use relative path to
include Makefiles from the top level Makefile because the option
"--include-dir=$(srctree)" becomes effective when Make enters into
sub Makefiles.

To use relative path in any places, this commit moves the option
above the "sub-make" target.

This was imported from Linux (commit a436bb7b8063) and adjusted for
U-Boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-07-27 15:01:55 -04:00
Masahiro Yamada
98bd0e0d9b kbuild: sync with Linux 4.1
Update some build scripts to match Linux 4.1.  Commit-based syncing
was done so as not to break U-Boot specific changes.
The previous big sync was from Linux 3.18-rc1 by commit 176d098277
(kbuild: sync misc scripts with Linux 3.18-rc1).

The commits imported from Linux (some with adjustments) are:

[1] commit 9fb5e5372208973984a23ee6f5f025c05d364633
    Author: Robert Richter <rrichter@cavium.com>
    dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst

[2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: collect shorthands into scripts/Kbuild.include

[3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03
    Author: Michal Marek <mmarek@suse.cz>
    kbuild: Remove duplicate $(cmd) definition in Makefile.clean

[4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: remove redundant -rR flag of hdr-inst

[5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5
    Author: Michal Marek <mmarek@suse.cz>
    kbuild: Drop support for clean-rule

[6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736
    Author: Michal Marek <mmarek@suse.cz>
    kbuild: Fix removal of the debian/ directory

[7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: use mixed-targets when two or more config targets are given

[8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: fix cc-ifversion macro

[9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion

[10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: allow cc-ifversion to have the argument for false condition

[11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3
    Author: Heiko Carstens <heiko.carstens@de.ibm.com>
    ftrace: allow architectures to specify ftrace compile options

[12] commit 0b24becc810dc3be6e3f94103a866f214c282394
    Author: Andrey Ryabinin <a.ryabinin@samsung.com>
    kasan: add kernel address sanitizer infrastructure

[13] commit 4218affdf57f938c04e3a916a9685ee27079f377
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: remove warning about "make depend"

[14] commit 77479b38e2f58890eb221a0418357502a5b41cd6
    Author: Nathan Rossi <nathan.rossi@xilinx.com>
    kbuild: Create directory for target DTB

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-27 15:01:54 -04:00
Tom Rini
3c9cc70d71 Merge git://git.denx.de/u-boot-marvell 2015-07-23 09:02:28 -04:00
Stefan Roese
c25012b9af Makefile: Fix mvebu build target to use SPL load and exe-address
The u-boot-spl.kwb build target needs the SPL text-base
(CONFIG_SPL_TEXT_BASE) as load and execution address.

Signed-off-by: Stefan Roese <sr@denx.de>
2015-07-23 10:37:48 +02:00
Simon Glass
fa78e0a371 dm: Reduce SPL device tree size
The SPL device tree size must be minimised to save memory. Only include
properties that are needed by SPL - this is determined by the presence
of the "u-boot,dm-pre-reloc" property. Also remove a predefined list of
unused properties from the nodes that remain.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:21 -06:00
Bin Meng
786a08e0dd x86: Move VGA option rom macros to Kconfig
Move X86_OPTION_ROM_FILE & X86_OPTION_ROM_ADDR to arch/x86/Kconfig
and rename them to VGA_BIOS_FILE & VGA_BIOS_ADDR which depend on
HAVE_VGA_BIOS. The new names are consistent with other x86 binary
blob options like HAVE_FSP/FSP_FILE/FSP_ADDR.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-14 18:03:18 -06:00
Tom Rini
33711bdd4a Prepare v2015.07
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-07-14 13:32:21 -04:00
Prabhakar Kushwaha
687a7518a1 Makefile:Add GCC flag -fno-delete-null-pointer-checks
-fdelete-null-pointer-checks flag controls global dataflow analyses and
eliminate useless checks for null pointers; It assume that if a pointer is
checked after it has already been dereferenced, it cannot be null.
This flag is enabled by default.

gcc v4.9 has more optimizations added to this option. Hence it is very
aggressive with GCC v4.9 series. Add -fno-delete-null-pointer-checks to
disable the optimization

Signed-off-by: Rohit Dharmakan <rohitarulraj@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
2015-07-08 18:26:41 -04:00
Tom Rini
9c6b05cb72 Prepare v2015.07-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-06-29 17:22:01 -04:00
Tom Rini
3d0158ae18 Prepare v2015.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-06-08 17:48:33 -04:00
Masahiro Yamada
3113471f3a kbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build error
Since 741e58e0fc (Create a .cfg file containing the CONFIG options
used to build), all the Blackfin boards fail to build if the parallel
(-j) option is passed.

  $ make -s bf506f-ezkit_defconfig
  #
  # configuration written to .config
  #
  $ make -j8 CROSS_COMPILE=bfin-elf-
  scripts/kconfig/conf --silentoldconfig Kconfig
    CHK     include/config.h
    UPD     include/config.h
    GEN     include/autoconf.mk
    GEN     include/autoconf.mk.dep
    CHK     include/config/uboot.release
    CHK     include/generated/timestamp_autogenerated.h
    UPD     include/generated/timestamp_autogenerated.h
    CFG     u-boot.cfg
  include/asm-offsets.h:3:43: fatal error:
  generated/generic-asm-offsets.h: No such file or directory
  compilation terminated.
  make: *** [u-boot.cfg] Error 1

When parsing header files for defined CONFIG options, DO_DEPS_ONLY
must be defined to exclude generated headers that might not have
been available yet.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-28 08:18:22 -04:00
Chris Packham
e186851ae4 Makefile: Add U_BOOT_TZ and include in version
Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to
include the timezone in the version output.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2015-05-27 13:35:55 -04:00
Joe Hershberger
421f86f329 test: env: Add test framework for env
Add a new "env" subcommand to the ut command.

This will run unit tests on the env code. This should be targetable to
any device that supports the env features needed for the tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:18 -04:00
Przemyslaw Marczak
af41e8db26 dm: regulator: add implementation of driver model regulator uclass
This commit introduces the implementation of dm regulator API.
Device tree support allows for auto binding. And by the basic
uclass operations, it allows to driving the devices in a common
way. For detailed informations, please look into the header file.

Core files:
- drivers/power/regulator-uclass.c - provides regulator common functions api
- include/power/regulator.h - define all structures required by the regulator

Changes:
- new uclass-id: UCLASS_REGULATOR
- new config: CONFIG_DM_REGULATOR

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:37 -06:00
Du Huanpeng
74d339bef9 Makefile: add a symbol link tags for ctags
Signed-off-by: Du Huanpeng <u74147@gmail.com>
2015-05-10 09:59:37 -04:00
Tom Rini
905e8f9e53 Prepare v2015.07-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-05-05 19:52:15 -04:00
Tom Rini
b8d7652c81 Merge branch 'buildman' of git://git.denx.de/u-boot-x86 2015-04-18 19:24:13 -04:00
Simon Glass
741e58e0fc Create a .cfg file containing the CONFIG options used to build
At present CONFIG options are split across Kconfig and board config headers
files. Also we have multiple files containing these CONFIG options.

In order to see exactly what is being used for building, create a .cfg
file which holds these options as reported by the C preprocessor.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18 16:24:24 -06:00
Simon Glass
019808f97c dm: usb: sandbox: Add a uclass for USB device emulation
With sandbox we want to be able to emulate USB devices so that we can test
the USB stack. Add a uclass to support this. It implements the same
operations as a normal USB device driver, but in this case passes them on
to an emulation driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2015-04-18 11:11:26 -06:00
Kishon Vijay Abraham I
5b9ce0e28a usb: dwc3: Makefile: Make dwc3 driver compile in u-boot
Now that the entire dwc3 driver is adapted to compile with uboot build,
modify the Makefiles so that the dwc3 driver can be built.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
2015-04-14 05:48:10 +02:00
Tom Rini
f33cdaa4c3 Prepare v2015.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-04-13 10:53:03 -04:00
Albert ARIBAUD \(3ADEV\)
412ae53aad lpc32xx: add support for board work_92105
Work_92105 from Work Microwave is an LPC3250-
based board with the following features:
- 64MB or 128MB SDR DRAM
- 1 GB SLC NAND, managed through MLC controller.
- Ethernet
- Ethernet + PHY SMSC8710
- I2C:
  - EEPROM (24M01-compatible)
  - RTC (DS1374-compatible)
  - Temperature sensor (DS620)
  - DACs (2 x MAX518)
- SPI (through SSP interface)
  - Port expander MAX6957
- LCD display (HD44780-compatible), controlled
  through the port expander and DACs

This board has SPL support, and uses the LPC32XX boot
image format.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
2015-04-10 14:23:39 +02:00
Masahiro Yamada
cffcd28613 kbuild: include config.mk when auto.conf is not older than .config
Since the Kconfig conversion, config.mk has been included only when
include/config/auto.conf is newer than the .config file.

It causes build error if both files have the same time-stamps.
It is actually possible because EXT* file systems have a 1s time-stamp
resolution.

The config.mk should be included when include/config/auto.conf is
*not older* than the .config file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Tom Rini <trini@konsulko.com>
Reported-by: York Sun <yorksun@freescale.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Reported-by: Matthew Gerlach <mgerlach@opensource.altera.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2015-04-07 08:41:10 -04:00
Tom Rini
8a5c9ca4d0 Prepare v2015.04-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-03-31 20:53:59 -04:00
Masahiro Yamada
0a12e6872e generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig
Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
2015-03-28 09:03:08 -04:00
Masahiro Yamada
5f9eb22075 kbuild: remove scripts/multiconfig.sh
We have switched to the single .config configuration system,
the same one as used in Linux Kernel.

The necessary glue code is small enough now, so move it to the
top-level Makefile and scripts/kconfig/Makefile, and then delete
scripts/multiconfig.sh.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-03-28 09:03:08 -04:00
Tom Rini
052a681bae Prepare v2015.04-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-03-17 16:37:48 -04:00
Tom Rini
8176a87423 Prepare v2015.04-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-03-03 18:08:39 -05:00
Tom Rini
1e7b357a4e Prepare v2015.04-rc2
Signed-off-by: Tom Rini <trini@ti.com>
2015-02-17 11:07:19 -05:00
Andreas Bießmann
1fddd7b63c tools/imagetool: remove linker script
Commit a93648d197 introduced linker generated
lists for imagetool which is the base for some host tools (mkimage, dumpimage,
et al.).  Unfortunately some host tool chains do not support the used type of
linker scripts. Therefore this commit broke these host-tools for them, namely
FreeBSD and Darwin (OS/X).

This commit tries to fix this. In order to have a clean distinction between host
and embedded code space we need to introduce our own linker generated list
instead of re-using the available linker_lists.h provided functionality.  So we
copy the implementation used in linux kernel script/mod/file2alias.c which has
the very same problem (cause it is a host tool). This code also comes with an
abstraction for Mach-O binary format used in Darwin systems.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2015-02-16 12:41:41 -05:00
Tom Rini
db7a7dee68 Merge branch 'master' of git://git.denx.de/u-boot-x86 2015-02-10 10:42:56 -05:00
Stefan Roese
a90ffb5632 Makefile: Add another kwb build target used on Marvell Armada-XP (AXP)
This build target now includes the SPL binary as the bin_hdr into the
kwb image. Its used on the AXP port with the mainlined DDR training code.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Luka Perkov <luka.perkov@sartura.hr>
2015-02-06 17:24:48 +01:00
Simon Glass
eea0f11278 x86: Add an option to enabling building a ROM file
Rather than requiring the Makefile to be modified, provide a build option to
enable the ROM to be built.

We cannot do this by default since it requires binary blobs. Without these
the build will fail.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-02-05 22:16:43 -07:00
Tom Rini
112db9407d Prepare v2015.04-rc1
Signed-off-by: Tom Rini <trini@ti.com>
2015-02-02 12:39:29 -05:00
Simon Glass
73845350b6 dm: i2c: Add a compatbility layer
For boards which use multiple I2C devices, or for SOCs which support
multiple boards, we might want to convert these to driver model at different
times. At present this is difficult because we need to either use
CONFIG_DM_I2C for a board or not.

Add a compatibility layer which implements the old API, thus allowing a
board to move to driver model for I2C without requiring that everything it
uses is moved in the same commit.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:53 -07:00
Bo Shen
2a50712eca Makefile: clean boot.bin
When build for Atmel related boards which support SPL,
it will generate boot.bin, also clean when it when do
"make clean" operation.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-01-28 16:58:02 -05:00
Tom Rini
92fa7f53f1 Prepare v2015.01
Signed-off-by: Tom Rini <trini@ti.com>
2015-01-12 09:39:08 -05:00
Tom Rini
125738e819 Prepare v2015.01-rc4
Signed-off-by: Tom Rini <trini@ti.com>
2014-12-29 21:22:38 -05:00
Bin Meng
63faf2507d x86: Include FSP and CMC binary in the u-boot.rom build rules
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-12-18 17:26:07 -07:00
Bin Meng
8c5224c9f5 x86: Use consistent name XXX_ADDR for binary blob flash address
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-12-18 17:26:07 -07:00
Simon Glass
0f61de8d9d x86: Convert microcode format to device-tree-only
To avoid having two microcode formats, adjust the build system to support
obtaining the microcode from the device tree, even in the case where it
must be made available before the device tree can be accessed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2014-12-18 17:26:06 -07:00
Bin Meng
c7016234f7 x86: Refactor u-boot.rom build rules
Refactor u-boot.rom build rules by utilizing quiet_cmd_ and cmd_
macros. Also make writing mrc.bin and pci option rom to u-boot.rom
optional and remove mrc.bin from its dependent file list as not
every x86 board port needs mrc binary blob.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-12-13 22:32:04 -07:00
Alison Wang
45c2e480ed spl: Use u-boot.img instead of u-boot.bin
In SD boot, the magic number of u-boot image will be checked.
For LS102xA, u-boot.bin doesn't have the magic number. So use
u-boot.img which includes the magic number instead of u-boot.bin
when producing u-boot-with-spl-pbl.bin.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-12-11 09:37:48 -08:00
Alison Wang
94cb17d078 ls102xa: pblimage: Add pblimage tool support for LS102xA
For LS102xA, the size of spl/u-boot-spl.bin is variable.
This patch adds the support to deal with the variable
u-boot size in pblimage tool. It will be padded to 64
byte boundary.

Use pblimage_check_params() to add the specific operations
for ARM, such as PBI CRC and END command and the calculation
of pbl_cmd_initaddr.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-12-11 09:36:34 -08:00
Tom Rini
32fdf0e4d8 Prepare v2015.01-rc3
Signed-off-by: Tom Rini <trini@ti.com>
2014-12-08 16:35:08 -05:00
Masahiro Yamada
77d2675022 libfdt: descend from lib/ to lib/libfdt/
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-12-08 09:35:47 -05:00
Daniel Schwierzeck
e19db555b4 Kbuild: introduce Makefile in arch/$ARCH/
Introduce a Makefile under arch/$ARCH/ and include it in the
top Makefile (similar to Linux kernel). This allows further
refactoringi like moving architecture-specific code out of global
makefiles, deprecating config variables (CPU, CPUDIR, SOC) or
deprecating arch/$ARCH/config.mk.

In contrary to Linux kernel, U-Boot defines the ARCH variable by
Kconfig, thus the arch Makefile can only included conditionally
after the top config.mk.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-12-08 09:35:45 -05:00
Simon Glass
d040ac0a89 x86: Allow an option ROM to be built into U-Boot
Some x86 machines require a binary blob containing 16-bit initialisation
code for their video hardware. Allow this to be built into the x86 ROM so
that it is accessible during boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-25 07:11:16 -07:00
Tom Rini
2a82ec77d2 Prepare v2015.01-rc2
Signed-off-by: Tom Rini <trini@ti.com>
2014-11-24 17:08:47 -05:00
Tom Rini
746667f1e5 Merge git://git.denx.de/u-boot-x86
Conflicts:
	arch/x86/cpu/Makefile

Signed-off-by: Tom Rini <trini@ti.com>
2014-11-24 12:00:00 -05:00
Masahiro Yamada
165ecd26f0 kbuild: Descend into SOC directory from CPU directory
Some CPUs of some architectures have SOC directories.
At present, the build system directly descends into SOC directories
from the top Makefile, but it should generally descend into each
directory from its parent directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-11-23 06:49:02 -05:00
Simon Glass
fce7b27683 x86: Build a .rom file which can be flashed to an x86 machine
On x86 machines U-Boot needs to be added to a large ROM image which is
then flashed onto the target board. The ROM has a particular format so it
makes sense for U-Boot to build this image automatically. Unfortunately
it relies on binary blobs so we cannot require this for the default
build as yet.

Create a u-boot.rom output file for this purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-21 07:34:11 +01:00
Tom Rini
9906090f52 Prepare v2015.01-rc1
Signed-off-by: Tom Rini <trini@ti.com>
2014-11-10 16:25:29 -05:00
Tom Rini
490fdad586 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2014-11-10 16:25:28 -05:00
Sonic Zhang
240182d59a bfin: make the CPU macro of LDR target more genenric
Remove BFIN from the CPU macro in Makefile.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
2014-11-10 12:11:00 +08:00
Masahiro Yamada
176d098277 kbuild: sync misc scripts with Linux 3.18-rc1
This commit imports some updates in misc scripts from Linux 3.18-rc1.

[1] commit cbb4d3e6510b99522719c5ef0 by Horia Geanta
scripts/kernel-doc: handle object-like macros

[2] commit 164f0d2efaaef83 by Michal Marek
kbuild: Fix handling of backslashes in *.cmd files

[3] commit 270a00963cd367214e by Randy Dunlap
scripts/kernel-doc: recognize __meminit

[4] commit a4954fd7724c0f55361eb5 by Masahiro Yamada
  kbuild: remove obj-n and lib-n handling

[5] commit 5b2389b45d1a9c12b9f by Masahiro Yamada
kbuild: simplify build, clean, modbuiltin shorthands

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-11-07 16:27:07 -05:00
Masahiro Yamada
ffe29ebc07 kbuild: sync top Makefile with Linux 3.18-rc1
Since Linux 3.15, relative path feature and related fixes,
cleanups have been merged to the top Makefile.

The relative path feature looks stable enough, so let's import it
to U-Boot along with various cleanups.

Commits imported from Linux (some need adjustment) are:

[1] commit 7e1c04779efd by Michal Marek
  kbuild: Use relative path for $(objtree)

[2] commit 890676c65d69 by Michal Marek
  kbuild: Use relative path when building in the source tree

[3] commit 9da0763bdd82 by Michal Marek
  kbuild: Use relative path when building in a subdir of the source tree

[4] commit c2e28dc975ea by Michal Marek
  kbuild: Print the name of the build directory

[5] commit 066b7ed95580 by Michal Marek
  kbuild: Do not print the build directory with make -s

[6] commit 3f1d9a6cec01 by Michal Marek
  kbuild: make -s should be used with kernelrelease/kernelversion/image_name

[7] commit 7ff525712acf by Masahiro Yamada
  kbuild: fake the "Entering directory ..." message more simply

[8] commit 745a254322c8 by Masahiro Yamada
  kbuild: use $(Q) for sub-make target

[9] commit aa55c8e2f7a3 by Masahiro Yamada
  kbuild: handle C=... and M=... after entering into build directory

[10] commit ab7474ea5361 by Borislav Petkov
  Kbuild: Ignore GREP_OPTIONS env variable

To use relative path feature, tools/Makefile and scripts/Makefile.autoconf
must be tweaked.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-11-07 16:27:06 -05:00
Masahiro Yamada
48aa812d8c kbuild: remove "clobber" target
Now we stick to Linux Kernel's build system, so squash
"clobber" to "clean" target.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-11-07 16:27:06 -05:00
Masahiro Yamada
5add293bd8 generic-board: make compile-time noise for non-generic boards
Commit 0f605c1501 (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>
2014-11-07 16:27:04 -05:00
Simon Glass
57f878efe5 dm: sunxi: Add a new config for an FDT-based pcDuino3
For now we won't want to mess with the existing configurations. Create a
new one which will enable device tree and driver model. Note that this
brings the device tree binary into u-boot-sunxi-with-spl.bin.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-11-05 13:09:58 +01:00
Masahiro Yamada
76eb5d815e kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax
Now CONFIG_USE_PRIVATE_LIBGCC is only used as a boolean macro.
Remove CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-23 13:19:06 -04:00
Stefan Roese
b2b8a6967a Makefile: Add CONFIG_BUILD_TARGET to automatically build an special image
Add target to build it automatically upon "make" / MAKEALL. This can/should
be set by board / cpu specific headers if a special U-Boot image is
required for this SoC / board.

E.g. used by Marvell Armada XP to automatically build the u-boot.kwb
target.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-23 09:59:21 -04:00
Stefan Roese
41e5ee54e3 arm: armada-xp: Add basic support for Marvell Armada XP SoC
This basic support for the Marvell Armada XP is base on the existing kirkwood
support. Which has been generatized by moving some common files into
common marvell locations.

This is in preparation for the upcoming Armada XP MV78460 support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
2014-10-23 09:59:21 -04:00
Stefan Roese
d80cca29fe arm: kirkwood: Move some SoC files into new arch/arm/mvebu-common
By moving some kirkwood files into a Marvell common directory, those files
can be used by other Marvell platforms as well. The name mvebu is taken
from the Linux kernel source tree. It has been chosen there to represent
the SoC's from the Marvell EBU (Engineering Business Unit). Those SoC's
currently are:

Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x

This will be used by the upcoming Armada XP (MV78460) platform support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-23 09:58:41 -04:00
Tom Rini
c43fd23cf6 Prepare v2014.10
Signed-off-by: Tom Rini <trini@ti.com>
2014-10-14 04:47:15 -04:00
Tom Rini
c7ad5cbb1e Makefile: drop "tools-only" from no-dot-config-targets
With the introduction of CONFIG_LOCALVERSION support we cannot build
tools without having a config file (as we won't know our PLAIN_VERSION
until then).

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@ti.com>
2014-10-13 08:38:55 -04:00
Tom Rini
742de9076e Prepare v2014.10-rc3
Signed-off-by: Tom Rini <trini@ti.com>
2014-10-06 20:23:09 -04:00
Masahiro Yamada
f494e0a184 kbuild: refactor some makefiles
[1] Move driver/core/, driver/input/ and drivers/input/ entries
    from the top Makefile to drivers/Makefile

[2] Remove the conditional by CONFIG_DM in drivers/core/Makefile
    because the whole drivers/core directory is already selected
    by CONFIG_DM in the upper level

[3] Likewise for CONFIG_DM_DEMO in drivers/demo/Makefile

[4] Simplify common/Makefile - both CONFIG_DDR_SPD and
    CONFIG_SPD_EEPROM are boolean macros so they can directly
    select objects

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
2014-09-24 18:30:29 -04:00
Masahiro Yamada
f458e3559b kconfig: fix a bug of "make config"
Since 3ff291f371
(kconfig: convert Kconfig helper script into a shell script),
"make config" is not working because of a missing '$' before '(Q)'.

Besides, "make config" should be invoked via scripts/multiconfig.sh
to avoid a warning message:
Kconfig:11:warning: environment variable KCONFIG_OBJDIR undefined

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-09-16 12:23:58 -04:00
Masahiro Yamada
3b61297024 kbuild: force to define __UBOOT__ in all the C sources
U-Boot has imported various source files from other projects,
mostly Linux.

Something like

  #ifdef __UBOOT__
    [ modification for U-Boot ]
  #else
    [ original code ]
  #endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2014-09-16 12:23:56 -04:00
Jeroen Hofstee
b477fe44ee Makefile: default to cc for host compiler
Since the host compiler might not be gcc but e.g. clang
default to cc/c++ to invoke it.

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-09-11 10:12:05 +02:00
Tom Rini
d6c1ffc7d2 Prepare v2014.10-rc2
Signed-off-by: Tom Rini <trini@ti.com>
2014-09-02 16:58:29 -04:00
Masahiro Yamada
4a8ed8e248 kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag
and adjust the help document.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
3ff291f371 kconfig: convert Kconfig helper script into a shell script
Commit 51148790 added scripts/multiconfig.py written in Python 2
to adjust Kconfig for U-Boot.

It has been hard for Python 3 users because Python 2 and Python 3
are not compatible with each other.

We are not happy about adding a new host tool dependency
(in this case, Python version dependency) for the core build process.
After some discussion, we decided to use only basic tools.

The script may get a bit more unreadable by shell scripting,
but we believe it is worthwhile.

In addition, this commit revives "<board>_config" target that is
equivalent to "<board>_defconfig" for backwards compatibility.
It is annoying to adjust various projects which use U-Boot.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Stephen Warren <swarren@nvidia.com>
2014-08-22 10:41:50 -04:00
Roger Meier
fd18a89e7f Makefile: remove generated boards.cfg within make distclean
Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
2014-08-22 10:41:35 -04:00
Vasili Galka
cac8f38aff Makefile: Use Kbuild style for system_map.o generation step
The command generating the "common/system_map.o" file was always shown
during the build making the output messy. Now it is called using the
Kbuild "cmd" macro, so that the full command is shown only when
building in verbose mode.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
2014-08-21 12:01:29 -04:00
Masahiro Yamada
e773440425 kbuild: sync mixed targets handling with Linux 3.16
"make %_config all" was supported for the first time in U-Boot:
  commit 53bca5ab
  kbuild: support simultaneous board configuration and "make all"

Surprisingly it had not been working in Linux Kernel for a long time.

So I sent back the patch to the Linux Kbuild community and it was
accepted with a little code improvement, at commit 9319f453.

Now, you can do "make defconfig all" or "make %_defconfig all"
in Linux too.

This commit updates some scripts to fill the code-diff
between Linux and U-Boot.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-21 12:01:11 -04:00
Masahiro Yamada
6419e14492 kbuild: move extra gcc checks to scripts/Makefile.extrawarn
This commit was imported from Linux Kernel:
commit a86fe353 written by me.

W=... provides extra gcc checks.

Having such code in scripts/Makefile.build results in the same flags
being added to KBUILD_CFLAGS multiple times becuase
scripts/Makefile.build is invoked every time Kbuild descends into
the subdirectories.

Since the top Makefile is already too cluttered, this commit moves
all of extra gcc check stuff to a new file scripts/Makefile.extrawarn,
which is included from the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-21 12:01:11 -04:00
Chris Packham
3ce7a4fefa Makefile: use u-boot.map for binary_size_check
u-boot.map is generated automatically by the compiler and more
importantly can handle addresses >4GB.
2014-08-09 11:17:02 -04:00
Chris Packham
67b060b46b Makefile: use $(shell ...) for determining file_size
file_size was being calculated using back-ticks but map_size uses
$(shell ...). Update the file_size calculation to use $(shell ...).

From: Jeroen Hofstee <jeroen@myspectrum.nl>

The binary_size_check target relies on stat -c %s
to return the size of u-boot.bin. This only works
with GNU stat though. Use wc instead.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-09 11:17:02 -04:00
Tom Rini
e76b933e02 Prepare v2014.10-rc1
Signed-off-by: Tom Rini <trini@ti.com>
2014-08-06 09:12:58 -04:00
Masahiro Yamada
51148790f2 kconfig: switch to Kconfig
This commit enables Kconfig.
Going forward, we use Kconfig for the board configuration.
mkconfig will never be used. Nor will include/config.mk be generated.

Kconfig must be adjusted for U-Boot because our situation is
a little more complicated than Linux Kernel.
We have to generate multiple boot images (Normal, SPL, TPL)
from one source tree.
Each image needs its own configuration input.

Usage:

Run "make <board>_defconfig" to do the board configuration.

It will create the .config file and additionally spl/.config, tpl/.config
if SPL, TPL is enabled, respectively.

You can use "make config", "make menuconfig" etc. to create
a new .config or modify the existing one.

Use "make spl/config", "make spl/menuconfig" etc. for spl/.config
and do likewise for tpl/.config file.

The generic syntax of configuration targets for SPL, TPL is:

  <target_image>/<config_command>

Here, <target_image> is either 'spl' or 'tpl'
      <config_command> is 'config', 'menuconfig', 'xconfig', etc.

When the configuration is done, run "make".
(Or "make <board>_defconfig all" will do the configuration and build
in one time.)

For futher information of how Kconfig works in U-Boot,
please read the comment block of scripts/multiconfig.py.

By the way, there is another item worth remarking here:
coexistence of Kconfig and board herder files.

Prior to Kconfig, we used C headers to define a set of configs.

We expect a very long term to migrate from C headers to Kconfig.
Two different infractructure must coexist in the interim.

In our former configuration scheme, include/autoconf.mk was generated
for use in makefiles.
It is still generated under include/, spl/include/, tpl/include/ directory
for the Normal, SPL, TPL image, respectively.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-07-30 08:48:03 -04:00
Albert ARIBAUD
b1cdd8baa1 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2014-07-28 12:26:21 +02:00
Khoronzhuk, Ivan
0e7f2dbac6 keystone: add support for NAND gpheader image
Add support for NAND gpheader image. TI Keystone2 ROM bootloader
expects 8 bytes of trailing zeroes in the nand u-boot image.
So add zeros at the end of the nand gph image.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-07-25 15:21:06 -04:00
Igor Grinberg
5fc2f924dc Makefile: fix tags target documentation
Replace the TAGS target name by the actual ctags target name.
Also, add etags target documentation.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2014-07-22 07:44:27 -04:00
Igor Grinberg
b3dfe43c6c Makefile: fix ctags/etags clean targets
Commit efcf861 (kbuild: use scripts/Makefile.clean)
refactored the cleaning targets and accidentially replaced the actually
generated "ctags" and "etags" files in the file list by "tags" and "TAGS".
"tags" and "TAGS" are not part of the Makefile build targets and
therefore should not be a part of the list for clean targets.

Substitute the actually generated files instead, to fix the clean
targets behavior.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2014-07-22 07:44:27 -04:00
Igor Grinberg
8d819ab5e1 Makefile: fix the {c, e}tags/cscope build targets
Commit 9e41403 (kbuild: change out-of-tree build)
changed the U-Boot build working directory to the output tree
for the out-of-tree builds.
This broke the {c,e}tags/cscope build targets as TAG_SUBDIRS variable
collected directories based on assumption that the build working
directory is the U-Boot source tree directory.

Fix the {c,e}tags/cscope build targets by adding the $(srctree) prefix.
Also, remove the $(obj) prefix from the etags build target to finish
the $(obj) prefix removal started by the same commit.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2014-07-22 07:44:27 -04:00
Tom Rini
524123a707 Prepare v2014.07
Signed-off-by: Tom Rini <trini@ti.com>
2014-07-14 13:16:45 -04:00
Masahiro Yamada
e9c16a8012 Makefile: drop arch/*/include/asm/proc from make mrproper pattern
Commit 7d89982b stopped creating symbolic link
arch/${arch}/include/asm/proc.

We do not need to delete it by "make mrproper" any more.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Vasili Galka <vvv444@gmail.com>
2014-07-07 19:42:33 -04:00
Simon Glass
0b308f14f0 Avoid using gawk-specific strtonum()
We need to subtract two hex numbers. Avoid using strtonum() by doing the
subtraction in bc with a suitable input base.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Vasili Galka <vvv444@gmail.com>
2014-07-07 19:42:33 -04:00
Tom Rini
a176ff0705 Prepare v2014.07-rc4
Signed-off-by: Tom Rini <trini@ti.com>
2014-07-02 13:36:19 -04:00
Masahiro Yamada
45f0ad9545 cosmetic: kbuild: clean-up coding style (sync with Linux 3.16-rc1)
Import the following trivial commits from Linux v3.16-rc1:

 bb66fc6 kbuild: trivial - use tabs for code indent where possible
 7eb6e34 kbuild: trivial - remove trailing empty lines
 3fbb43d kbuild: trivial - fix comment block indent
 38385f8 kbuild: trivial - remove trailing spaces

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-20 11:56:26 -04:00
Simon Glass
d18926af30 fdt: Rename the DEV_TREE_BIN Makefile flag to to EXT_DTB
This seems like a better name. This is a patch-up to the earlier commit
63b4b5b, and also removes a redundant Makefile change.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:56 -04:00
Masahiro Yamada
c71630838d 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.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-11 16:27:05 -04:00
Masahiro Yamada
15c939f970 kbuild: export HOSTCXX and HOSTCXXFLAGS
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-11 16:25:47 -04:00
Simon Glass
63b4b5bae5 fdt: Add DEV_TREE_BIN option to specify a device tree binary file
In some cases, an externally-built device tree binary is required to be
attached to U-Boot. An example is when using image signing, since in that
case the .dtb file must include the public keys.

Add a DEV_TREE_BIN option to the Makefile, and update the documentation.

Usage is something like:

	make DEV_TREE_BIN=boot/am335x-boneblack-pubkey.dtb

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-11 16:25:46 -04:00
Simon Glass
89742924c8 Check that u-boot.bin size looks correct
Check that the image size matches the size we get from u-boot.bin. If it
doesn't, that generally means that some extra sections are being added to
u-boot.bin, meaning that it is not possible to access data appended to
the U-Boot binary. This is used for device tree, so needs to work.

This problem was introduced by commit b02bfc4. By adding a test we can
prevent a reccurence.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-11 16:25:39 -04:00
Jeroen Hofstee
9262233a96 Makefile: fix clang warnings due to clang support
Building u-boot tools with clang as a host compiler e.g. on
FreeBSD with `gmake HOSTCC=clang CONFIG_USE_PRIVATE_LIBGCC=y tools`
leads to many warnings [1] for every compiler invocation since
commit 598e2d33. Part of mentioned commit imports linux patches:

 - kbuild: LLVMLinux: Adapt warnings for compilation with clang
 - kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang

No version of clang supports the gcc fno-delete-null-pointer-checks
though, but it is only passed to clang. Gcc does not have the clang
specific Qunused-arguments for the target. Furthermore several
warnings are disabled which aren't encountered in u-boot. Since such
a build has worked for quite some time and works after removing these
changes, just remove the clang specific handling to restore normal
building with clang as hostcc.

[1] Actual warnings
-------------------
  GEN     include/autoconf.mk.dep
arm-freebsd-gcc: unrecognized option '-Qunused-arguments'

  HOSTCC  scripts/basic/fixdep
clang: warning: argument unused during compilation:
                '-fno-delete-null-pointer-checks'

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-06-11 16:25:38 -04:00
Tom Rini
76b21026ce Prepare v2014.07-rc3
Signed-off-by: Tom Rini <trini@ti.com>
2014-06-10 11:55:44 -04:00
Masahiro Yamada
66948c25bb nand_spl: remove nand_spl infrastructure
Remove the common infrastructure of nand_spl and
clean-up the code inside ifdef(CONFIG_NAND_U_BOOT)..endif.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-05 17:01:59 -04:00
Masahiro Yamada
f77d709663 kbuild: add missing PERL definition
"checkstack" target uses $(PERL) so PERL must be defined.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-05 14:38:38 -04:00
Masahiro Yamada
06e878cb3d kbuild: remove unused RANLIB
RANLIB was added by commit e221174 (more than a decade ago)
but it has been never referenced at all.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-05 14:38:38 -04:00
Tom Rini
90b51c33f3 Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-05-30 11:34:39 -04:00
Tom Rini
0116f40bbc Prepare v2014.07-rc2
Signed-off-by: Tom Rini <trini@ti.com>
2014-05-27 10:22:07 -04:00
Ian Campbell
50827a5991 sunxi: non-FEL SPL boot support for sun7i
Add support for booting from an MMC card.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Henrik Nordström <henrik@henriknordstrom.net>
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Tom Cubie <Mr.hipboi@gmail.com>
Reviewed-by: Tom Rini <trini@ti.com>
2014-05-25 16:31:03 +02:00
Tom Rini
9665fa8f9e Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-05-24 06:34:08 -04:00
Alexey Brodkin
e75e73dd5f examples: select libgcc for non-default architecture
In case of multilib-enabled toolchains if default architecture differ from
the one examples are being built for linker will fail to link example object
files with libgcc of another (non-compatible) architecture.

Interesting enough for years in main Makefile we used CFLAGS/c_flags for this
but not for examples.

So fixing it now.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denx <wd@denx.de>
Acked-by: WOlfgang Denk <wd@denx.de>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-05-23 16:51:26 -04:00
Albert ARIBAUD
c534d2fdcf Merge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master' 2014-05-23 22:50:23 +02:00
Albert ARIBAUD
05d134b084 Merge remote-tracking branch 'u-boot/master'
Conflicts:
	boards.cfg

Conflicts were trivial once u-boot-arm/master boards.cfg was
reformatted (commit 6130c146) to match u-boot/master's own
reformatting (commit 1b37fa83).
2014-05-20 10:05:42 +02:00
Masahiro Yamada
2405d09c4c build: support a new image u-boot-dtb.img
In SPL framework, SPL uses u-boot.img to load u-boot.bin.
Here,
    u-boot.img = uImage header + u-boot.bin

To use OF control with a separate devicetree,
u-boot.dtb must be placed right after u-boot.bin.
In this case, u-boot-dtb.bin is generally used.
Here,
    u-boot-dtb.bin = u-boot.bin + u-boot.dtb

We need u-boot-dtb.img to use both SPL framework
and separate OF control at the same time.
    u-boot-dtb.img = uImage header + u-boot-dtb.bin

For example, Zynq boards already define all of
  - CONFIG_SPL
  - CONFIG_OF_CONTROL
  - CONFIG_OF_SEPARATE

So, the support of u-boot-dtb.img is urgent.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-15 13:57:27 +02:00
Christian Riesch
532d531828 arm, davinci: Use CONFIG_SPL_PAD_TO for padding the SPL in an ais image
The commits

commit b7b5f1a16c
Author: Albert ARIBAUD <albert.u.boot@aribaud.net>
da850evm, da850_am18xxevm: convert to CONFIG_SPL_MAX_FOOTPRINT

and

commit e7497891e3
Author: Albert ARIBAUD <albert.u.boot@aribaud.net>
cam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT

replaced CONFIG_SPL_MAX_SIZE by CONFIG_SPL_MAX_FOOTPRINT. However,
CONFIG_SPL_MAX_SIZE is used in the Makefile for padding the SPL
when preparing an u-boot.ais image. By removing CONFIG_SPL_MAX_SIZE
said commits broke the ais image of the da850evm and cam_enc_4xx
configurations.

This patch converts the u-boot.ais target to use CONFIG_SPL_PAD_TO
instead of CONFIG_SPL_MAX_SIZE for padding the SPL and adds
a #define CONFIG_SPL_PAD_TO where it is required.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Reported-by: Tom Taylor <ttaylor.tampa@gmail.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2014-05-13 19:43:01 -04:00
Michal Simek
69c0d323e3 kbuild: Fix trailing whitespaces
Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-12 16:31:51 -04:00
Masahiro Yamada
65bb6d8dee kbuild: build with -Werror=date-time if the compiler supports it
Using __DATE__, __TIME__ would make the build non-deterministic.

If the code needs to refer to build date/time, use U_BOOT_DATE and
U_BOOT_TIME in include/generated/timestamp_autogenerated.h instead.

This commit has been imported from Linux Kernel,
which should be applied to U-Boot too:

    commit fe7c36c7bde12190341722af69358e42171162f3
    Author: Josh Triplett <josh@joshtriplett.org>
    Date:   Mon Dec 23 13:56:06 2013 -0800

    Makefile: Build with -Werror=date-time if the compiler supports it

    GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use
    of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build
    non-deterministic.  Now that the kernel does not use any of those
    macros, turn on -Werror=date-time if available, to keep it that way.

    The kernel already (optionally) records this information at build time
    in a single place; other kernel code should not duplicate that.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-05-12 15:19:46 -04:00
Tom Rini
3e41c54ad8 Prepare v2014.07-rc1
Signed-off-by: Tom Rini <trini@ti.com>
2014-05-12 08:54:13 -04:00
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