27 Oct, 2014
1 commit
-
There's a definition in stdint.h (provided by gcc) which will be more correct
if available.Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make'
commmand.This adjusts the settings for x86 and sandbox, with both have 64-bit options.
Signed-off-by: Gabe Black
Reviewed-by: Gabe Black
Tested-by: Gabe Black
Reviewed-by: Bill Richardson
Rewritten to be an option, since stdint.h is often available only in glibc.
Changed to preserve a clear boundary between stdint and non-stdint
Signed-off-by: Simon Glass
24 Oct, 2014
1 commit
-
Since the environment "VENDOR" is set in tcsh, it must be cleared in our
makefile. Otherwise, boards without CONFIG_SYS_VENDOR fail to build:> make CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_defconfig all
[ snip ]
AR arch/arm/lib/lib.a
CC arch/arm/lib/eabi_compat.o
scripts/Makefile.build:55: /home/foo/u-boot/board/unknown/wandboard/ \
Makefile: No such file or directory
make[2]: *** No rule to make target `/home/foo/u-boot/board/unknown/ \
wandboard/Makefile'. Stop.
make[1]: *** [board/unknown/wandboard] Error 2
make: *** [__build_one_by_one] Error 2Signed-off-by: Masahiro Yamada
Reported-by: Tom Everett
Reported-by: Jeroen Hofstee
25 Sep, 2014
1 commit
-
This was lost sometime in the Kbuild conversion. Add it back.
Check that the trace test now passes:
$ ./test/trace/test-trace.sh
Simple trace test / sanity check using sandbox/tmp/filemHKPGw
Build sandbox
O=sandbox FTRACE=1
GEN /home/sjg/c/src/third_party/u-boot/files/sandbox/Makefile
Configuring for sandbox board...
Check results
Test passedSigned-off-by: Simon Glass
30 Jul, 2014
1 commit
-
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 _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:
/
Here, is either 'spl' or 'tpl'
is 'config', 'menuconfig', 'xconfig', etc.When the configuration is done, run "make".
(Or "make _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
Acked-by: Simon Glass
08 Jul, 2014
1 commit
-
The directory arch/${ARCH}/cpu/${CPU} does not exist
in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86.These architectures have only one CPU type.
Defining CPU should not be required for such architectures.This commit allows cpu field (= the 3rd field of boards.cfg)
to be kept blank.Signed-off-by: Masahiro Yamada
Cc: Andreas Bießmann
Cc: Simon Glass
Cc: Sonic Zhang
Cc: Michal Simek
Cc: Thomas Chou
Cc: Stefan Kristiansson
13 Mar, 2014
2 commits
-
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
-
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
07 Mar, 2014
1 commit
-
Kbuild brought about many advantages for us but a significant
performance regression was reported by Simon Glass.After some discussions and analysis, it turned out
its main cause is in $(call cc-option,...).Historically, U-Boot parses all config.mk
(arch/*/config.mk and board/*/config.mk)
every time descending into subdirectories.
That means cc-options are evaluated over and over again.$(call cc-option,...) is useful but costly.
So we want to evaluate them only in ./Makefile
and spl/Makefile and export compiler flags.This commit changes the build system as follows:
- Modify scripts/Makefile.build to not include config.mk
Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
cppflags-y.- Export many variables
Going forward, Kbuild will not parse config.mk files
when it descends into subdirectories.
If we want to set variables in config.mk and use them
in subdirectories, they must be exported.This is the list of variables to get exported:
PLATFORM_CPPFLAGS
CPUDIR
BOARDDIR
OBJCOPYFLAGS
LDFLAGS
LDFLAGS_FINAL
(used in nand_spl/board/*/*/Makefile)
CONFIG_STANDALONE_LOAD_ADDR
(used in examples/standalone/Makefile)
SYM_PREFIX
(used in examples/standalone/Makefile)
RELFLAGS
(used in examples/standalone/Makefile)- Delete CPPFLAGS
This variable has been replaced with PLATFORM_CPPFLAGS- Copy gcclibdir from example/standalone/Makefile
to arch/sparc/config.mk
The reference in CONFIG_STANDALONE_LOAD_ADDR must be
resolved before it is exported.Signed-off-by: Masahiro Yamada
Reported-by: Simon Glass
Acked-by: Simon Glass
Tested-by: Simon Glass [on Sandbox]
Tested-by: Stephen Warren [on Tegra]
05 Mar, 2014
1 commit
-
U-Boot has compelled all boards to have
board/${BOARD}/ or board/${VENDOR}/${BOARD}/ directory.Sometimes it does not seem suitable for some boards,
for example Sandbox. (Is it a board?)And arcangel4 board has nothing to compile
under the board directory.This commit makes the build system more flexible:
If '' is given to the 6th column (=Board name) of boards.cfg,
Kbuild will not descend into the board directory.Signed-off-by: Masahiro Yamada
04 Mar, 2014
1 commit
-
This variable was abolished by Kbuild series.
I forgot to delete it.Signed-off-by: Masahiro Yamada
26 Feb, 2014
1 commit
-
Rename OBJCFLAGS to OBJCOPYFLAGS beforehand to use
"cmd_objcopy" in scripts/Makefile.lib in an upcoming commit.Signed-off-by: Masahiro Yamada
20 Feb, 2014
13 commits
-
This commit changes the location of include directives
of board configuration files.The purpose of this change is:
- Slim down $(TOPDIR)/config.mk
- Prevent $(TOPDIR)/Makefile from including the same
configuration file twice
- Do not include include/config.mk multiple times
because ARCH, CPU, BOARD, VENDOR, SOC are exportedBefore this commit:
- include/autoconf.mk was included from $(TOPDIR)/Makefile
and $(TOPDIR)/config.mk
(This means $(TOPDIR)/Makefile included include/autoconf.mk twice)- include/{spl,tpl}-autoconf.mk was included from $(TOPDIR)/config.mk
- include/config.mk was included from $(TOPDIR)/Makefile
and $(TOPDIR)/config.mk
(This means $(TOPDIR)/Makefile included include/config.mk twice)After this commit:
- include/autoconf.mk is included from $(TOPDIR)/Makefile
and $(TOPDIR)/scripts/Makefile.build- include/{spl,tpl}-autoconf.mk is included from $(TOPDIR)/spl/Makefile
and $(TOPDIR)/scripts/Makefile.build- include/config.mk is included from $(TOPDIR)/config.mk and
$(TOPDIR)/spl/MakefileSigned-off-by: Masahiro Yamada
-
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build objWe need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.Additionally, we need to fix compiler flags which are
locally added or removed.In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.Signed-off-by: Masahiro Yamada
Tested-by: Gerhard Sittig -
This commit changes the working directory
where the build process occurs.Before this commit, build process occurred under the source
tree for both in-tree and out-of-tree build.That's why we needed to add $(obj) prefix to all generated
files in makefiles like follows:
$(obj)u-boot.bin: $(obj)u-bootHere, $(obj) is empty for in-tree build, whereas it points
to the output directory for out-of-tree build.And our old build system changes the current working directory
with "make -C " syntax when descending into the
sub-directories.On the other hand, Kbuild uses a different idea
to handle out-of-tree build and directory descending.The build process of Kbuild always occurs under the output tree.
When "O=dir/to/store/output/files" is given, the build system
changes the current working directory to that directory and
restarts the make.Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj="
syntax for descending into sub-directories.
(We can write it like "make $(obj)=" with a shorthand.)
This means the current working directory is always the top
of the output directory.Signed-off-by: Masahiro Yamada
Tested-by: Gerhard Sittig -
This commit moves some flags which are used
under examples/ directory only.Signed-off-by: Masahiro Yamada
-
Some flags are used for SPL (and TPL) build only.
This commit moves them from config.mk to spl/Makefile.Signed-off-by: Masahiro Yamada
-
Signed-off-by: Masahiro Yamada
-
This commit merges commonly-used header include paths
to UBOOTINCLUDE and NOSTDINC_FLAGS variables, which are placed
at the top Makefile.Signed-off-by: Masahiro Yamada
-
Before this commit, most of compiler flags were defined in config.mk.
But it is redundant because config.mk is included from all recursive make.This commit moves many complier flags to the top Makefile
and export them.
And we use new vaiarables to store them:
KBUILD_CPPFLAGS, KBUILD_CFLAGS, KBUILD_AFLAGS.
This will allow us to switch more smoothly to Kbuild.Signed-off-by: Masahiro Yamada
-
This commit adjusts some files to use Kbuild.include.
- Use cc-option defined in Kbuild.include
(Delete cc-option in config.mk)
- Use cc-version defined in
(Delete cc-version in config.mk)
- Move binutils-version and dtc-version to Kbuild.include
by analogy to cc-versionThis commit also adds srctree (same as SRCTREE)
to use Kbuild scripts.Signed-off-by: Masahiro Yamada
-
BFD_ROOT_DIR is used only in tools/gdb/Makefile
Signed-off-by: Masahiro Yamada
-
This commit moves some variable definitions from config.mk
to the top Makefile:- HOSTCC, HOSTCFLAGS, HOSTLDFLAGS
- AS, LD, CC, CPP, etc.
- SHELL (renamed to CONFIG_SHELL)I'd like to slim down config.mk file
because it is included from all recursive make.
It is redundant to re-define the variables
every time descending into sub directories.
We should rather define them at the top Makefile
and export them.U-Boot makefiles has been used "SHELL" variable to store shell
chosen for the user, whereas Linux Kernel uses "CONFIG_SHELL".We should never use "SHELL" variable because it is
a special variable for GNU Make.
Changing SHELL may cause unpredictable side effects
whose root cause is usually difficult to find.
We should use a generic variable name "CONFIG_SHELL".We should not use the syntax as follows either:
rm -f $(obj)tools/env/{fw_printenv,fw_setenv}
This depends on "bash" although GNU Make generally
invokes "sh" to run the each rule.Signed-off-by: Masahiro Yamada
-
This commit moves suffix rules from config.mk
to scripts/Makefile.build, which will allow us
to switch smoothly to real Kbuild.Note1:
post/lib_powerpc/fpu/Makefile has
its own rule to compile C sources.
We need to tweak it to keep the same behavior.Note2:
There are two file2 with the same name:
arch/arm/lib/crt0.S and eamples/api/crt0.S.
To keep the same build behavior,
examples/api/Makefile also has to be treaked.Signed-off-by: Masahiro Yamada
-
Before this commit, makefiles under tools/ directory
were implemented with their own way.This commit refactors them by using "hostprogs-y" variable.
Several C sources have been added to wrap other C sources
to simplify Makefile.
For example, tools/crc32.c includes lib/crc32.cSigned-off-by: Masahiro Yamada
30 Jan, 2014
1 commit
-
Commit cbe5cdfcd changed config.mk and arch/sandbox/cpu/Makefile
to use -idirafter instead of -I and remove -nostdinc.But
* Sandbox-specific code dirties config.mk
* os.c is compiled without such compiler flags as:
-Wall -Wstrict-prototypes -Wno-format-security
-fno-builtin -ffreestanding -fno-stack-protector
-fstack-usage -Wno-format-nonliteralThis commit use -idirafter and remove the -nostdinc
differently and more simply.Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass
13 Dec, 2013
1 commit
-
We have some scripts imported from Linux Kernel:
setlocalversion, checkstack.pl, checkpatch.pl, cleanpatchThey are located under tools/ directory in U-Boot now.
But they were originally located under scripts/ directory
in Linux Kernel.This commit moves them to the original location.
It is true that binutils-version.sh and dtc-version.sh
do not originate in Linux Kernel, but they should
be moved by analogy to gcc-version.sh.Signed-off-by: Masahiro Yamada
22 Nov, 2013
1 commit
-
This file must be compiled with system headers, even if U-Boot has headers
of the same name. The existing solution for this is good enough for libfdt,
but fails when we have headers like stdint.h in U-Boot.Use -idirafter instead of -I, and remove the -nostdinc and other things
that we don't want for this file. The best way to do this is to keep a
copy of the original flags, rather than trying to filter them later.Signed-off-by: Simon Glass
18 Nov, 2013
1 commit
-
SPL_BIN is already defined in spl/Makefile
and it is used only in spl/Makefile.Signed-off-by: Masahiro Yamada
08 Nov, 2013
1 commit
-
In-tree build:
- Do not create a symbolic link
from include/asm to arch/${ARCH}/include/asm
- Add ${SRCTREE}/arch/arm/include into the header search pathOut-of-tree build:
- Do not create a directory ${OBJTREE}/include2
- Do not create a symbolic link
from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm
- Add ${SRCTREE}/arch/arm/include into the header search pathSigned-off-by: Masahiro Yamada
15 Oct, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Drop changes for PEP 4 following python tools]
Signed-off-by: Tom Rini
07 Sep, 2013
3 commits
-
For most boards which define CONFIG_SPL_PAD_TO,
it is defined in config header files.
Currently, there exists only one exception, cam_enc_4xx board.This patch moves CONFIG_SPL_PAD_TO definition
from board/ait/cam_enc_4xx/config.mk
to include/configs/cam_enc_4xx.h.With this modification, we can delete a glue code
in the top level config.mk:ifneq ($(CONFIG_SPL_PAD_TO),)
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
endifSigned-off-by: Masahiro Yamada
Cc: Heiko Schocher -
Currently no makefiles (board-specific config.mk)
set the following variables:CONFIG_SPL_TEXT_BASE
CONFIG_UBOOT_PAD_TO
CONFIG_RESET_VECTOR_ADDRESS
CONFIG_TPL_PAD_TOFor all target boards using above macros
they are set in header files (include/configs/*.h),
so we do not need to set them as CPPFLAGS.Signed-off-by: Masahiro Yamada
05 Sep, 2013
1 commit
-
Conflicts:
drivers/serial/serial.cThe conflict above was a trivial case of adding one init
function in each branch, and manually resolved in merge.
31 Aug, 2013
1 commit
-
Add mkimage support for generating and verifying MXS bootstream.
The implementation here is mostly a glue code between MXSSB v0.4
and mkimage, but the long-term goal is to rectify this and merge
MXSSB with mkimage more tightly. Once this code is properly in
U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage
support.Note that the mxsimage generator needs libcrypto from OpenSSL, I
therefore enabled the libcrypto/libssl unconditionally.MXSSB: http://git.denx.de/?p=mxssb.git;a=summary
The code is based on research presented at:
http://www.rockbox.org/wiki/SbFileFormatSigned-off-by: Marek Vasut
Cc: Tom Rini
Cc: Fabio Estevam
Cc: Stefano Babic
Cc: Otavio Salvador
21 Aug, 2013
1 commit
-
Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it can
not be more than 4K. So, the SPL cannot initialize the DDR with the SPD
code. This patch introduces TPL to enable a loader stub that is loaded
by the code from the SPL. It initializes the DDR with the SPD or other
operations.The TPL's size is sizeable, the maximum size is decided by the memory's
size that TPL runs. It initializes the DDR through SPD code, and copys
final uboot image to DDR. So there are three stage uboot images:
* spl_boot, * tpl_boot, * final uboot imageSigned-off-by: Ying Zhang
Acked-by: York Sun
20 Aug, 2013
1 commit
-
SPL defines CONFIG_SPL_BUILD but this does not percolate to the
autoconf.mk Makefile. As a result the build breaks when
CONFIG_SPL_BUILD is used in the board-specific include header file. With
this, there is a possibility of having a CONFIG option defined in the
header file but not defined in the Makefile causing all kinds of build
failure and problems.It also messes things for up, for example, when one might want to
undefine options to keep the SPL small and doesn't want to be stuck with
the CONFIG options used for U-boot. Lastly, this also avoids defining
special CONFIG_SPL_ variables for cases where some options are required
in U-boot but not in SPL.We add a spl-autoconf.mk rule that is generated for SPL with the
CONFIG_SPL_BUILD flag and conditionally include it for SPL builds.Signed-off-by: Joel Fernandes
Signed-off-by: Ying Zhang
03 Aug, 2013
1 commit
-
Subsequent patches assume that dtc supports various recent features.
These are available in dtc 1.4.0. Validate that dtc is at least that
version.Signed-off-by: Stephen Warren
Acked-by: Simon Glass
24 Jul, 2013
1 commit
-
Like many other projects, U-Boot has a tradition of including big
blocks of License headers in all files. This not only blows up the
source code with mostly redundant information, but also makes it very
difficult to generate License Clearing Reports. An additional problem
is that even the same lincenses are referred to by a number of
slightly varying text blocks (full, abbreviated, different
indentation, line wrapping and/or white space, with obsolete address
information, ...) which makes automatic processing a nightmare.To make this easier, such license headers in the source files will be
replaced with a single line reference to Unique Lincense Identifiers
as defined by the Linux Foundation's SPDX project [1]. For example,
in a source file the full "GPL v2.0 or later" header text will be
replaced by a single line:SPDX-License-Identifier: GPL-2.0+
We use the SPDX Unique Lincense Identifiers here; these are available
at [2].Note: From the legal point of view, this patch is supposed to be only
a change to the textual representation of the license information,
but in no way any change to the actual license terms. With this patch
applied, all files will still be licensed under the same terms they
were before.Note 2: The apparent difference between the old "COPYING" and the new
"Licenses/gpl-2.0.txt" only results from switching to the upstream
version of the license which is differently formatted; there are not
any actual changes to the content.Note 3: There are some recurring questions about linense issues, such
as:
- Is a "All Rights Reserved" clause a problem in GPL code?
- Are files without any license header a problem?
- Do we need license headers at all?The following excerpt from an e-mail by Daniel B. Ravicher should help
with these:| Message-ID:
| Date: Wed, 21 Oct 2009 18:35:22 -0400
| From: "Daniel B. Ravicher"
| To: Wolfgang Denk
| Subject: Re: GPL and license cleanup questions
|
| Mr. Denk,
|
| Wolfgang Denk wrote:
| > - There are a number of files which do not include any specific
| > license information at all. Is it correct to assume that these files
| > are automatically covered by the "GPL v2 or later" clause as
| > specified by the COPYING file in the top level directory of the
| > U-Boot source tree?
|
| That is a very fact specific analysis and could be different across the
| various files. However, if the contributor could reasonably be expected
| to have known that the project was licensed GPLv2 or later at the time
| she made her contribution, then a reasonably implication is that she
| consented to her contributions being distributed under those terms.
|
| > - Do such files need any clean up, for example should we add GPL
| > headers to them, or is this not needed?
|
| If the project as a whole is licensed under clear terms, you need not
| identify those same terms in each file, although there is no harm in
| doing so.
|
| > - There are other files, which include both a GPL license header
| > _plus_ some copyright note with an "All Rights Reserved" clause. It
| > has been my understanding that this is a conflict, and me must ask
| > the copyright holders to remove such "All Rights Reserved" clauses.
| > But then, some people claim that "All Rights Reserved" is a no-op
| > nowadays. License checking tools (like OSLC) seem to indicate this is
| > a problem, but then we see quite a lot of "All rights reserved" in
| > BSD-licensed files in gcc and glibc. So what is the correct way to
| > deal with such files?
|
| It is not a conflict to grant a license and also reserve all rights, as
| implicit in that language is that you are reserving all "other" rights
| not granted in the license. Thus, a file with "Licensed under GPL, All
| Rights Reserved" would mean that it is licensed under the GPL, but no
| other rights are given to copy, modify or redistribute it.
|
| Warm regards,
| --Dan
|
| Daniel B. Ravicher, Legal Director
| Software Freedom Law Center (SFLC) and Moglen Ravicher LLC
| 1995 Broadway, 17th Fl., New York, NY 10023
| (212) 461-1902 direct (212) 580-0800 main (212) 580-0898 fax
| ravicher@softwarefreedom.org www.softwarefreedom.org[1] http://spdx.org/
[2] http://spdx.org/licenses/Signed-off-by: Wolfgang Denk
19 Jul, 2013
1 commit
-
The value of this config variable is not available to image.h on the host,
since the board config is not actually included. Bring this in so that
mkimage will be built with image-signing support for sandbox at least.Signed-off-by: Simon Glass