summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
Commit message (Collapse)AuthorAgeLines
* fix makefiles to respect DTC settingPavel Machek2015-04-07-1/+1
| | | | | | | Top-level Makefile has option to select dtc binary, but it is ignored due to bug in Makefile.lib. Fix it. Signed-off-by: Pavel Machek <pavel@denx.de>
* Align embedded device tree correctlySimon Glass2014-11-25-0/+2
| | | | | | | | Device trees must be aligned to a 4-byte boundary. This was dropped in the Kbuild conversion. Bring it back, and use 16-byte alignment for good measure. Signed-off-by: Simon Glass <sjg@chromium.org>
* kbuild: improve multi-objs dependency and cleanupsMasahiro Yamada2014-11-07-0/+9
| | | | | | | | | | | | | | | | | | | | | | Since Linux 3.18-rc1, Kbuild is able to handle multi-objs dependency correctly, which also allows us futher cleanups of some makefiles. This commit imports those commits: [1] commit c8589d1e9e01 by Masahiro Yamada kbuild: handle multi-objs dependency appropriately [2] commit 97e3226e6e98 by Masahiro Yamada kbuild: handle the dependency of multi-objs hostprogs appropriately [3] commit 022af62d0190 by Masahiro Yamada kbuild: refactor script/kconfig/Makefile [4] commit 221ecca6cafe by Masahiro Yamada kbuild: remove redundant clean-files from scripts/kconfig/Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge branch 'master' of git://git.denx.de/u-boot-dmTom Rini2014-06-20-0/+1
|\
| * Makefile: Support include files for .dts filesSimon Glass2014-06-20-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Linux supports this, and if we are to have compatible device tree files, U-Boot should also. Avoid giving the device tree files access to U-Boot's include/ directory. Only include/dt-bindings is accessible. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | cosmetic: kbuild: clean-up coding style (sync with Linux 3.16-rc1)Masahiro Yamada2014-06-20-5/+5
|/ | | | | | | | | | | 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>
* kbuild: move cmd_mkimage to scripts/Makefile.libMasahiro Yamada2014-06-05-0/+8
| | | | | | | Because cmd_mkimage is used in various subdirectories, it seems reasonable to define it in scripts/Makefile.lib. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: sync with Linux Kernel v3.15-rc1Masahiro Yamada2014-04-18-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kbuild: improve Kbuild speedMasahiro Yamada2014-03-07-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <yamada.m@jp.panasonic.com> Reported-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> [on Sandbox] Tested-by: Stephen Warren <swarren@nvidia.com> [on Tegra]
* dts: move device tree sources to arch/$(ARCH)/dts/Masahiro Yamada2014-02-19-1/+0
| | | | | | | | | | | | | | | | | Unlike Linux Kernel, U-Boot historically had *.dts files under board/$(VENDOR)/dts/ and *.dtsi files under arch/$(ARCH)/dts/. I think arch/$(ARCH)/dts dicretory is a better location to store both *.dts and *.dtsi files. For example, before this commit, board/xilinx/dts directory had both Microblaze dts (microblaze-generic.dts) and ARM dts (zynq-*.dts), which are totally unrelated. This commit moves *.dts to arch/$(ARCH)/dts/ directories, allowing us to describe nicely mutiple DTBs generation in the next commit. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* dts: re-write dts/Makefile more simply with KbuildMasahiro Yamada2014-02-19-6/+6
| | | | | | | | | | | 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>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-19-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: import more build scripts from Linux v3.13 tagMasahiro Yamada2014-02-19-0/+373
This commit imports build scripts from Linux Kernel v3.13 as they are. I know they include some trailing spaces but I am intentionally keeping them untouched. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>