summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2014-02-25kbuild: use shorten logs for cat rulesMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25kbuild: use shorten logs for mkimage rulesMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25kbuild: use shorten logs objcopy rulesMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25kbuild: Add $(Q) when descending into subdirectoriesMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-02-25kbuild: rename OBJCFLAGS to OBJCOPYFLAGSMasahiro Yamada
Rename OBJCFLAGS to OBJCOPYFLAGS beforehand to use "cmd_objcopy" in scripts/Makefile.lib in an upcoming commit. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25kbuild: move asm-offsets.h rules to ./KbuildMasahiro Yamada
Generate include/generated/generic-asm-offsets.h and include/generated/asm-offsets.h in ./Kbuild. This commit also changes the include guard. Before this commit, __ASM_OFFSETS_H__ was used for both of them. So we could not include generic-asm-offsets.h and asm-offsets.h at the same time. This commit renames the include guard of the former to __GENERIC_ASM_OFFSETS_H__. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25kbuild: abolish "depend" targetMasahiro Yamada
This commit moves include/generated/{generic-asm-offsets.h, asm-offsets.h} from "depend" targets to "prepare" targets and deletes "depend" targets. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25kbuild: consolidate version and timestamp headers generationMasahiro Yamada
- Generate include/generated/{timestamp.h, version.h} more simply by using filechk rule. - Add $(UBOOTRELEASE) variable and re-write u-boot.imx rule more simply. - Rename U_BOOT_VERSION in Makefile to UBOOTVERSION Before this commit, the same variable name, "U_BOOT_VERSION" was used for two different strings. One of them was defined in Makefile. It takes the form like "2014.01-rc1" and used in makefiles and script files. The other is defined in include/generated/version.h It takes the form like "U-Boot 2014.01-rc1-00010-gbe6d426-dirty" and used in C and Aseembler. It is confusing when grepping the source tree. So, this commit renames the former to UBOOTVERSION. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25Makefile: add a new script to check -fstack-usage supportMasahiro Yamada
If -fstack-usage option is given to crosstools that do not support it, gcc displays a warning message but still exits with status 0. This means we can not rely on $(call cc-option,...) to detect if -fstack-usage option is supported or not. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-21kbuild: fix errors of 'make *tags' and 'make cscope'Masahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Nishanth Menon <nm@ti.com>
2014-02-21kbuild: a minor optimization of "make clobber"Masahiro Yamada
The pattern rule "MLO*" can delete both MLO and MLO.byteswap. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-20Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD
Conflicts: Makefile drivers/net/npe/Makefile These two conflicts arise from commit 0b2d3f20 ("ARM: NET: Remove the IXP NPE ethernet driver") and are resolved by deleting the drivers/net/npe/Makefile file and removing the CONFIG_IXP4XX_NPE line from Makefile.
2014-02-19Prepare v2014.04-rc1v2014.04-rc1Tom Rini
Signed-off-by: Tom Rini <trini@ti.com>
2014-02-19dts: re-write dts/Makefile more simply with KbuildMasahiro Yamada
Useful rules in scripts/Makefile.lib allows us to easily generate a device tree blob and wrap it in assembly code. We do not need to parse a linker script to get output format and arch. This commit deletes ./u-boot.dtb since it is a copy of dts/dt.dtb. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kernel-doc: move kernel-doc tools to scripts/Masahiro Yamada
tools/kernel-doc/docproc.c and tools/kernel-doc/kernel-doc are files imported from Linux Kernel. They originally resided under scripts/ directory in Linux Kernel. This commit moves them to the original location. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-02-19kbuild: check clean source and generate Makefile for out-of-tree buildMasahiro Yamada
For out-of-tree build - Check if the source tree is clean - Create a Makefile in the output directory Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: support simultaneous board configuration and "make all"Masahiro Yamada
This commit fixes two problems: [1] We could not do board configuration and "make all" in one command line. For example, the following did not work as we expect: $ make sandbox_config all Configuring for sandbox board... make: Nothing to be done for `all'. [2] mixed-target build did not work with -j option For example, the following did not work: $ make -j8 sandbox_config u-boot Makefile:481: *** "System not configured - see README". Stop. make: *** [u-boot] Error 2 make: *** Waiting for unfinished jobs.... Configuring for sandbox board... Going forward, we can do $ make -j8 sandbox_config all This is the same as $ make sandbox_config $ make -j8 Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: use scripts/Makefile.cleanMasahiro Yamada
This commit refactors cleaning targets such as clean, clobber, mrpropper, distclean with scripts/Makefile.clean. By using scripts/Makefile.clean, we can recursively descend into subdirectories and delete generated files there. We do not need add a big list of generated files to the "clean" target. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19Makefile: refactor tools-all targetsMasahiro Yamada
- Move "easylogo", "gdb" tagets to tools/Makefile - Delete "gdbtools" target (same as "gdb") Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19Makefile: Do not pass MTD_VERSION from the top MakefileMasahiro Yamada
$(MTD_VERSION) is used in tools/env/Makefile If you specify a variable at a command line like: $ make MTD_VERSION=old env or specify it thru an envrionment variable like: $ export MTD_VERSION=old $ make env it is inherited to the sub-make too. We do not need to pass it from the top Makefile explicitely. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: refactor Makefile and spl/Makefile moreMasahiro Yamada
This commit refactors rules of directory descending and defines u-boot-dirs and u-boot-all-dirs. (We will need u-boot-all-dirs when using scripts/Makefile.clean) Additionally, rename LIBS-y to libs-y. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19examples: move api/ and standalone/ entry to examples/MakefileMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: change the top Makefile to more Kbuild-ish structureMasahiro Yamada
This commit changes the top Makefile to handle various targets nicely. Make targets are divided into four categories: - mixed-targets We can call a configuration target and build targets at one command line like follows: $ make <board_name>_config u-boot They are handled one by one. - config targets <board_name>_config - no-dot-config-targets Targets we can run without board configuration such as clean, mrproper, distclean, TAGS, %docs, etc. - build targets The other target which need board configuration. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19Makefile: remove a cleaning target "tidy"Masahiro Yamada
Before this commit, "make tidy" did "make clean" + delete "*.depend*" files. But, we do not have "*.depend*" files any more, which means "make tidy" is the same as "make clean". This commit removes the redandant target "tidy". Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: generate {spl, tpl}-autoconf.mk only when it is necessaryMasahiro Yamada
Before this commit, {spl,tpl}-autoconf.mk was always generated at the top Makefile even if SPL(TPL) build was not selected. This commit moves the build rule of {spl,tpl}-autoconf.mk from the top Makefile to spl/Makefile. It prevents unnecessary {spl,tpl}-autoconf.mk from being generated. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: convert some make rules to Kbuild styleMasahiro Yamada
We can get Kbuild-ish log style like this: GEN include/autoconf.mk GEN include/autoconf.mk.dep We do not need XECHO any more. And also change checkstack target like Linux Kernel. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: move some lines to more suitable placeMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19kbuild: use Linux Kernel build scriptsMasahiro 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 obj We 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 <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-19kbuild: change out-of-tree buildMasahiro Yamada
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-boot Here, $(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 <sub-dir>" 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=<sub-dir>" syntax for descending into sub-directories. (We can write it like "make $(obj)=<sub-dir>" with a shorthand.) This means the current working directory is always the top of the output directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-19Makefile: move more stuff to top MakefileMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19Makefile: refactor include path settingsMasahiro 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 <yamada.m@jp.panasonic.com>
2014-02-19Makefile: move more flags to the top MakefileMasahiro 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 <yamada.m@jp.panasonic.com>
2014-02-19kbuild: Use Kbuild.includeMasahiro 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-version This commit also adds srctree (same as SRCTREE) to use Kbuild scripts. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19Makefile: move some variable definitions to the top MakefileMasahiro 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 <yamada.m@jp.panasonic.com>
2014-02-19nand-spl: Use scripts/Makefile.buildMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19examples: Use scripts/Makefile.buildMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19board: samsung: refactor host programsMasahiro Yamada
Some Samsung boards have their own tools under board/samsung/<board>/tools/. This commit refactor more makefiles with "hostprogs-y". Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19tools: convert makefiles to kbuild styleMasahiro 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.c Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-06ARM: NET: Remove the IXP NPE ethernet driverMarek Vasut
This driver is no longer used, remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Michael Schwingen <michael@schwingen.org> Cc: Tom Rini <trini@ti.com>
2014-01-21powerpc:Rename CONFIG_PBLRCW_CONFIG & CONFIG_SYS_FSL_PBL_PBIPrabhakar Kushwaha
Rename CONFIG_PBLRCW_CONFIG and CONFIG_PBLRCW_CONFIG. Also add their details in README. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2014-01-20Prepare v2014.01v2014.01Tom Rini
Signed-off-by: Tom Rini <trini@ti.com>
2014-01-13Prepare v2014.01-rc3v2014.01-rc3Tom Rini
Signed-off-by: Tom Rini <trini@ti.com>
2014-01-10Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini
Bringing in the MMC tree means that CONFIG_BOUNCE_BUFFER needed to be added to include/configs/exynos5-dt.h now. Conflicts: include/configs/exynos5250-dt.h Signed-off-by: Tom Rini <trini@ti.com>
2014-01-09arm64: Make checkarmreloc accept arm64 relocationsScott Wood
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
2014-01-09arm64: Turn u-boot.bin back into an ELF file after relocate-relaScott Wood
While performing relocations on u-boot.bin should be good enough for booting on real hardware, some simulators insist on booting an ELF file (and yet don't perform ELF relocations), so convert the relocated binary back into an ELF file. This can go away in the future if we change relocate-rela to operate directly on the ELF file, or if and when we stop caring about a simulator with this restriction. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
2014-01-09arm64: Add tool to statically apply RELA relocationsScott Wood
ARM64 uses the newer RELA-style relocations rather than the older REL. RELA relocations have an addend in the relocation struct, rather than expecting the loader to read a value from the location to be updated. While this is beneficial for ordinary program loading, it's problematic for U-Boot because the location to be updated starts out with zero, rather than a pre-relocation value. Since we need to be able to run C code before relocation, we need a tool to apply the relocations at build time. In theory this tool is applicable to other newer architectures (mainly 64-bit), but currently the only relocations it supports are for arm64, and it assumes a 64-bit little-endian target. If the latter limitation is ever to be changed, we'll need a way to tell the tool what format the image is in. Eventually this may be replaced by a tool that uses libelf or similar and operates directly on the ELF file. I've written some code for such an approach but libelf does not make it easy to poke addresses by memory address (rather than by section), and I was hesitant to write code to manually parse the program headers and do the update outside of libelf (or to iterate over sections) -- especially since it wouldn't get test coverage on things like binaries with multiple PT_LOAD segments. This should be good enough for now to let the manual relocation stuff be removed from the arm64 patches. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
2013-12-18tegra: allow build to succeed with SPL disabledVidya Sagar
u-boot-dtb-tegra.bin and u-boot-nodtb-tegra.bin binaries are generated only if the SPL build is enabled as they have dependency on SPL build Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2013-12-18Makefile: fix broken pipe error for lcd4_lwmon5 boardMasahiro Yamada
Before this commit, a broken pipe error sometimes happened when building lcd4_lwmon5 board with Buildman. This commit re-writes build rules of u-boot.spr and u-boot-img-spl-at-end.bin more simply without using a pipe. Besides fixing a broken pipe error, this commit gives us other advantages: - Do not generate intermidiate files, spl/u-boot-spl.img and spl/u-boot-spl-pad.img for creating u-boot.spr - Do not generate an intermidiate file, u-boot-pad.img for creating u-boot-img-spl-at-end.bin Such intermidiate files were not deleted by "make clean" or "make mrpropr". Nor u-boot-pad.img was ignored by git. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Stefan Roese <sr@denx.de>
2013-12-18Makefile: fix the typo error for mrproperBo Shen
Fix the typo error for mrproper from mkproper. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-12-16Prepare v2014.01-rc2v2014.01-rc2Tom Rini
Signed-off-by: Tom Rini <trini@ti.com>