summaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeLines
* kbuild: fix errors of 'make *tags' and 'make cscope'Masahiro Yamada2014-02-21-1/+1
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Nishanth Menon <nm@ti.com>
* kbuild: a minor optimization of "make clobber"Masahiro Yamada2014-02-21-1/+1
| | | | | | The pattern rule "MLO*" can delete both MLO and MLO.byteswap. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2014-02-20-443/+866
|\ | | | | | | | | | | | | | | | | | | | | 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.
| * Prepare v2014.04-rc1Tom Rini2014-02-19-2/+2
| | | | | | | | Signed-off-by: Tom Rini <trini@ti.com>
| * dts: re-write dts/Makefile more simply with KbuildMasahiro Yamada2014-02-19-8/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
| * kernel-doc: move kernel-doc tools to scripts/Masahiro Yamada2014-02-19-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: check clean source and generate Makefile for out-of-tree buildMasahiro Yamada2014-02-19-6/+55
| | | | | | | | | | | | | | | | 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>
| * kbuild: support simultaneous board configuration and "make all"Masahiro Yamada2014-02-19-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: use scripts/Makefile.cleanMasahiro Yamada2014-02-19-82/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Makefile: refactor tools-all targetsMasahiro Yamada2014-02-19-5/+3
| | | | | | | | | | | | | | - Move "easylogo", "gdb" tagets to tools/Makefile - Delete "gdbtools" target (same as "gdb") Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * Makefile: Do not pass MTD_VERSION from the top MakefileMasahiro Yamada2014-02-19-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | $(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>
| * kbuild: refactor Makefile and spl/Makefile moreMasahiro Yamada2014-02-19-80/+85
| | | | | | | | | | | | | | | | | | | | | | 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>
| * examples: move api/ and standalone/ entry to examples/MakefileMasahiro Yamada2014-02-19-4/+1
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * kbuild: change the top Makefile to more Kbuild-ish structureMasahiro Yamada2014-02-19-123/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Makefile: remove a cleaning target "tidy"Masahiro Yamada2014-02-19-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: generate {spl, tpl}-autoconf.mk only when it is necessaryMasahiro Yamada2014-02-19-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: convert some make rules to Kbuild styleMasahiro Yamada2014-02-19-34/+43
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: move some lines to more suitable placeMasahiro Yamada2014-02-19-33/+33
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-19-39/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: change out-of-tree buildMasahiro Yamada2014-02-19-271/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Makefile: move more stuff to top MakefileMasahiro Yamada2014-02-19-3/+17
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * Makefile: refactor include path settingsMasahiro Yamada2014-02-19-1/+13
| | | | | | | | | | | | | | | | 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>
| * Makefile: move more flags to the top MakefileMasahiro Yamada2014-02-19-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kbuild: Use Kbuild.includeMasahiro Yamada2014-02-19-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Makefile: move some variable definitions to the top MakefileMasahiro Yamada2014-02-19-13/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * nand-spl: Use scripts/Makefile.buildMasahiro Yamada2014-02-19-1/+1
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * examples: Use scripts/Makefile.buildMasahiro Yamada2014-02-19-4/+1
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * board: samsung: refactor host programsMasahiro Yamada2014-02-19-0/+1
| | | | | | | | | | | | | | 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>
| * tools: convert makefiles to kbuild styleMasahiro Yamada2014-02-19-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ARM: NET: Remove the IXP NPE ethernet driverMarek Vasut2014-02-06-1/+0
|/ | | | | | | | | 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>
* powerpc:Rename CONFIG_PBLRCW_CONFIG & CONFIG_SYS_FSL_PBL_PBIPrabhakar Kushwaha2014-01-21-2/+2
| | | | | | | | | 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>
* Prepare v2014.01Tom Rini2014-01-20-1/+1
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* Prepare v2014.01-rc3Tom Rini2014-01-13-1/+1
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-01-10-5/+36
|\ | | | | | | | | | | | | | | | | | | 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>
| * arm64: Make checkarmreloc accept arm64 relocationsScott Wood2014-01-09-5/+9
| | | | | | | | | | Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * arm64: Turn u-boot.bin back into an ELF file after relocate-relaScott Wood2014-01-09-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * arm64: Add tool to statically apply RELA relocationsScott Wood2014-01-09-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tegra: allow build to succeed with SPL disabledVidya Sagar2013-12-18-0/+2
| | | | | | | | | | | | | | | | | | 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>
* | Makefile: fix broken pipe error for lcd4_lwmon5 boardMasahiro Yamada2013-12-18-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Makefile: fix the typo error for mrproperBo Shen2013-12-18-1/+1
| | | | | | | | | | | | | | Fix the typo error for mrproper from mkproper. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Simon Glass <sjg@chromium.org>
* | Prepare v2014.01-rc2Tom Rini2013-12-16-1/+1
| | | | | | | | Signed-off-by: Tom Rini <trini@ti.com>
* | Makefile, .gitignore: Cleanup non-existing binariesMasahiro Yamada2013-12-16-5/+2
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | examples: x86: delete 82559_eepromMasahiro Yamada2013-12-16-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit fea25720 renamed arch/i386 to arch/x86. But it missed to modify examples/standalone/Makefile. Since then, examples/standalone/82559_eeprom has never compiled and nobody has noticed that. After some discussion on ML, we agreed to delete this example. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: Select objects by CONFIG_ rather than $(ARCH) or $(CPU)Masahiro Yamada2013-12-16-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert like follows: CPU mpc83xx -> CONFIG_MPC83xx CPU mpc85xx -> CONFIG_MPC85xx CPU mpc86xx -> CONFIG_MPC86xx CPU mpc5xxx -> CONFIG_MPC5xxx CPU mpc8xx -> CONFIG_8xx CPU mpc8260 -> CONFIG_8260 CPU ppc4xx -> CONFIG_4xx CPU x86 -> CONFIG_X86 ARCH x86 -> CONFIG_X86 ARCH powerpc -> CONFIG_PPC Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: delete unnecessary linesMasahiro Yamada2013-12-16-5/+0
| | | | | | | | | | | | REMOTE_BUILD is not used any more. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: Move some scripts imported from LinuxMasahiro Yamada2013-12-13-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some scripts imported from Linux Kernel: setlocalversion, checkstack.pl, checkpatch.pl, cleanpatch They 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 <yamada.m@jp.panasonic.com>
* | drivers/mtd: descend into sub directories only when it is necessaryMasahiro Yamada2013-12-13-2/+2
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | post: descend only when CONFIG_HAS_POST is definedMasahiro Yamada2013-12-13-1/+1
| | | | | | | | | | | | | | | | | | | | All objects under post/ directory are enabled by CONFIG_HAS_POST. (post/tests.o is enabled by CONFIG_POST_STD_LIST. But CONFIG_POST_STD_LIST depends on CONFIG_HAS_POST.) We can move CONFIG_HAS_POST switch to the top Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: delete a make rule of $(LDSCRIPT)Masahiro Yamada2013-12-13-5/+2
| | | | | | | | | | | | | | | | | | | | $(LDSCRIPT) is a source file, not a generated file. We do not need a make rule of $(LDSCRIPT). And one more trivial fix: $(obj)/u-boot should not dierectly depend on $(LDSCRIPTS). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: correct dependencies of asm-offsets.[hs]Masahiro Yamada2013-12-13-15/+4
| | | | | | | | | | | | | | These four generated files depends on neither {spl,tpl}-autoconf.mk nor autoconf.mk.dep. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>