01 Apr, 2014
1 commit
-
Signed-off-by: Tom Rini
31 Mar, 2014
1 commit
-
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-onlyNeither board configuration nor cross compiler are required to
build host tools.Signed-off-by: Masahiro Yamada
Suggested-by: Alexey Brodkin
Cc: Simon Glass
Cc: Tom Rini
Acked-by: Alexey Brodkin
29 Mar, 2014
3 commits
-
"make clean", "make clobber", "make mrproper" and "make distclean"
missed to clean-up some files when they were run with
O= option.Signed-off-by: Masahiro Yamada
Reported-by: Wolfgang Denk -
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
Suggested-by: Simon Glass
Acked-by: Simon Glass
Tested-by: Simon Glass -
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
Cc: Tom Rini
Cc: Masahiro Yamada
Acked-by: Masahiro Yamada
13 Mar, 2014
9 commits
-
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
Cc: Tom Rini
Acked-by: Simon Glass -
These variable are no longer used.
Signed-off-by: Masahiro Yamada
-
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
-
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
-
Non-empty $(KBUILD_SRC) means out-of-tree build.
Signed-off-by: Masahiro Yamada
-
Pull out "$(SRCTREE)/" from CONFIG_SYS_KWD_CONFIG
and push it into the top Makefile.Signed-off-by: Masahiro Yamada
Cc: Michael Walle
Cc: Simon Guinot
Cc: Dave Purdy
Cc: Stefan Herbrechtsmeier
Cc: Luka Perkov
Cc: Valentin Longchamp
Cc: Jason Cooper
Cc: Siddarth Gore
Cc: Prafulla Wadaskar
Cc: Eric Cooper
Cc: Suriyan Ramasami -
Pull out "$(SRCTREE)/" from CONFIG_SYS_FSL_PBL_PBI
and CONFIG_SYS_FSL_PBL_RCW and push it into the top Makefile.Signed-off-by: Masahiro Yamada
Cc: York Sun
Cc: Poonam Aggrwal
Cc: Valentin Longchamp -
Signed-off-by: Masahiro Yamada
Cc: Fabio Estevam
Cc: Otavio Salvador
Cc: Lauri Hintsala
Acked-by: Marek Vasut
11 Mar, 2014
2 commits
-
Signed-off-by: Tom Rini
-
include/generated/version_autogenerated.h was not correctly
generated on the parallel build (with -j option).Signed-off-by: Masahiro Yamada
Reported-by: Andreas Bießmann
07 Mar, 2014
5 commits
-
"checkgcc4" is used only for PowerPC.
Move it to arch/powerpc/config.mk.To make sure gcc is new enough before beginning build,
run "checkgcc4" during "archprepare".Signed-off-by: Masahiro Yamada
-
"checkthumb" makes sense only for ARM architecture.
Move it to arch/arm/config.mk.To make sure gcc supports THUMB mode before beginning build,
run "checkthumb" during "archprepare".Signed-off-by: Masahiro Yamada
-
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] -
Before this commit, USE_PRIVATE_LIBGCC was defined in
arch-specific config.mk and referenced in
arch/$(ARCH)/lib/Makefile.We are not happy about parsing config.mk again and again.
We have to keep the same behavior with a different way.By adding "CONFIG_" prefix, this macro appears
in include/autoconf.mk, include/spl-autoconf.mk.
(And treating USE_PRIVATE_LIBGCC as CONFIG macro
is reasonable enough.)Tegra SoC family defined USE_PRIVATE_LIBGCC as "yes"
in arch/arm/cpu/arm720t/tegra*/config.mk,
whereas did not define it in arch/arm/cpu/armv7/tegra*/config.mk.It means Tegra enables PRIVATE_LIBGCC only for SPL.
We can describe the same behavior by adding#ifdef CONFIG_SPL_BUILD
# define CONFIG_USE_PRIVATE_LIBGCC
#endifto include/configs/tegra-common.h.
Signed-off-by: Masahiro Yamada
Cc: Tom Warren
Cc: Simon Glass
Acked-by: Stephen Warren -
config.tmp is never generated
Signed-off-by: Masahiro Yamada
Cc: Michal Simek
Acked-by: Michal Simek
05 Mar, 2014
8 commits
-
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
-
Programs in tools/ directory are usually built for the host.
But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are
useful on the target OS too.Actually, prior to Kbuild, U-Boot could build tools for
the target like follows:$ make _config
$ export CROSS_COMPILE=
$ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip toolsIn Kbuild, we can no longer replace HOSTCC at the command line.
In order to get back that feature, this commit adds "cross-tools" target.
Usage:
Build tools for the host
$ make CROSS_COMPILE= toolsBuild tools for the target
$ make CROSS_COMPILE= cross_toolsBesides, "make cross_tools" strip tools programs because we
generally expect smaller storages on embedded systems.Signed-off-by: Masahiro Yamada
Reported-by: Heiko Schocher
Cc: Wolfgang Denk
Cc: Tom Rini
Tested-by: Heiko Schocher
Acked-by: Heiko Schocher -
The top Makefile must export HOST_TOOLS_ALL to use it
in tools/Makefile.Signed-off-by: Masahiro Yamada
Tested-by: Heiko Schocher
Acked-by: Heiko Schocher -
We had switched to Kbuild so now we can specify
PLATFORM_LIBS/PLATFORM_LIBGCC with relative path.Signed-off-by: Masahiro Yamada
Acked-by: Tom Rini
Acked-by: Simon Glass
Tested-by: Simon Glass -
As an example of how to write a uclass and a driver, provide a demo version
of each, accessible through the 'demo' command.To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO.
The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and
CONFIG_DM_DEMO_SHAPE.Signed-off-by: Simon Glass
Signed-off-by: Marek Vasut
Signed-off-by: Pavel Herrmann
Signed-off-by: Viktor Křivák
Signed-off-by: Tomas Hlavacek -
Add some tests of driver model functionality. Coverage includes:
- basic init
- binding of drivers to devices using platform_data
- automatic probing of devices when referenced
- availability of platform data to devices
- lifecycle from bind to probe to remove to unbind
- renumbering within a uclass when devices are probed/removed
- calling driver-defined operations
- deactivation of drivers when removed
- memory leak across creation and destruction of drivers/uclasses
- uclass init/destroy methods
- automatic probe/remove of children/parents when neededThis function is enabled for sandbox, using CONFIG_DM_TEST.
Signed-off-by: Simon Glass
-
Add driver model functionality for generic board.
This includes data structures and base code for registering devices and
uclasses (groups of devices with the same purpose, e.g. all I2C ports will
be in the same uclass).The feature is enabled with CONFIG_DM.
Signed-off-by: Simon Glass
Signed-off-by: Marek Vasut
Signed-off-by: Pavel Herrmann
Signed-off-by: Viktor Křivák
Signed-off-by: Tomas Hlavacek -
Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE
option to make it easier to use device tree with sandbox.This adjusts the Makefile to build a u-boot.dtb file which can be passed
to sandbox U-Boot with:./u-boot -d u-boot.dtb
Signed-off-by: Simon Glass
04 Mar, 2014
2 commits
-
Now we have two different frameworks for doing the same thing.
I'd like to propose to drop nand_spl framework.
How about deleting it before v2014.07 release?In the interim, this commit will display a warning message
when compiling nand_spl board.Now we have 19 nand_spl boards:
MPC8315ERDB_NAND
SIMPC8313_LP
SIMPC8313_SP
MPC8536DS_NAND
MPC8569MDS_NAND
MPC8572DS_NAND
P1023RDS_NAND
P1011RDB_NAND
P1020RDB_NAND
P2010RDB_NAND
P2020RDB_NAND
acadia_nand
bamboo_nand
canyonlands_nand
glacier_nand
haleakala_nand
kilauea_nand
rainier_nand
sequoia_nandThey must be ported to SPL before the deadline,
otherwise they will be removed.Signed-off-by: Masahiro Yamada
Cc: Dave Liu
Cc: Ron Madrid
Cc: Roy Zang
Cc: Stefan Roese
Acked-by: Stefan Roese -
LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.
Signed-off-by: Masahiro Yamada
26 Feb, 2014
9 commits
-
Same as the previous commit.
Move sanity check to prepare1 target to avoid nasty troubles.Before this commit, LDSCRIPT existence was not checked
when it was specified by CONFIG_SYS_LDSCRIPT.
Now LDSCRIPT existence is checked for all boards.$(wildcard $(LDSCRIPT)) must point to the linker scripts
with absolute path.
Otherwise, make will terminate with a false error
on out-of-tree build.Signed-off-by: Masahiro Yamada
-
Before this commit, make terminated with an error
where is shouldn't under some condition.This bug happened when we built a board unsupporting
generic board right after building with generic board.For example, the following sequence failed.
(harmony uses generic board but microblaze-generic does not
support it)$ make harmony_config
Configuring for harmony board...
$ make CROSS_COMPILE=arm-linux-gnueabi-
[ Build succeed ]
$ make microblaze-generic_config
Configuring for microblaze-generic board...
$ make CROSS_COMPILE=microblaze-linux-
Makefile:488: *** Your architecture does not support generic board.
Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file. Stop.We had to do "make clean" before building the microblaze board.
This commit fixes this unconvenience.
Move generic board sanity check to "prepare1" target,
which is run after generation of include/autoconf.mk.Signed-off-by: Masahiro Yamada
-
Commit 6ab6b2af deleted ./u-boot.dtb because it was a copy
of dts/dt.dtb.But Simon suggested to keep u-boot.dtb at the top directory
because it is a build output.After discussions, we agreed on revival of ./u-boot.dtb.
Signed-off-by: Masahiro Yamada
Cc: Simon Glass
Cc: Tom Rini
Acked-by: Simon Glass -
"help" target has been copied from Linux 3.13 and adjusted
for U-Boot.
Unlike Linux, cleaning is done on 4 levels:
clean, clobber, mrproper, distclean.Signed-off-by: Masahiro Yamada
-
Import build rules of single targets from Linux 3.13.
Signed-off-by: Masahiro Yamada
-
This commit avoids generating ./SPL twice.
- Fist time descending to spl/
- Second time as a prerequisite of u-boot-with-spl.imx,
u-boot-with-nand-spl.imx.Signed-off-by: Masahiro Yamada
-
Signed-off-by: Masahiro Yamada
-
Signed-off-by: Masahiro Yamada
-
Move sandbox-specific link rule to arch/sandbox/config.mk.
Signed-off-by: Masahiro Yamada