summaryrefslogtreecommitdiff
path: root/dts/Makefile
AgeCommit message (Collapse)Author
2016-01-25Revert "devicetree: use wildcard to clean arch subdir"Masahiro Yamada
This reverts commit 67871a595873930a0a536b1685e5caac53766701. Since that commit, out-of-tree cleaning emits lots of warnings. $ make O=foo clean make[1]: Entering directory `/home/masahiro/workspace/u-boot/foo' ../dts/../arch/arm/dts/Makefile:209: warning: overriding commands for target `dtbs' ../dts/../arch/arc/dts/Makefile:15: warning: ignoring old commands for target `dtbs' ../dts/../arch/microblaze/dts/Makefile:13: warning: overriding commands for target `dtbs' ../dts/../arch/arm/dts/Makefile:209: warning: ignoring old commands for target `dtbs' ../dts/../arch/mips/dts/Makefile:14: warning: overriding commands for target `dtbs' ../dts/../arch/microblaze/dts/Makefile:13: warning: ignoring old commands for target `dtbs' ../dts/../arch/nios2/dts/Makefile:13: warning: overriding commands for target `dtbs' ../dts/../arch/mips/dts/Makefile:14: warning: ignoring old commands for target `dtbs' ../dts/../arch/powerpc/dts/Makefile:13: warning: overriding commands for target `dtbs' ../dts/../arch/nios2/dts/Makefile:13: warning: ignoring old commands for target `dtbs' ../dts/../arch/sandbox/dts/Makefile:14: warning: overriding commands for target `dtbs' ../dts/../arch/powerpc/dts/Makefile:13: warning: ignoring old commands for target `dtbs' ../dts/../arch/x86/dts/Makefile:22: warning: overriding commands for target `dtbs' ../dts/../arch/sandbox/dts/Makefile:14: warning: ignoring old commands for target `dtbs' make[1]: Leaving directory `/home/masahiro/workspace/u-boot/foo' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-22devicetree: use wildcard to clean arch subdirThomas Chou
Use wildcard to clean arch subdirectories, as it is cleaner than listing all the arch which builds dtb. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-01-16MIPS: add initial infrastructure for device-tree filesDaniel Schwierzeck
Prepare sub-folder for device-tree files. Make support for device-tree on MIPS available in Kbuild/Kconfig. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
2014-06-19fdt: Rename the DEV_TREE_BIN Makefile flag to to EXT_DTBSimon Glass
This seems like a better name. This is a patch-up to the earlier commit 63b4b5b, and also removes a redundant Makefile change. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-11fdt: Add DEV_TREE_BIN option to specify a device tree binary fileSimon Glass
In some cases, an externally-built device tree binary is required to be attached to U-Boot. An example is when using image signing, since in that case the .dtb file must include the public keys. Add a DEV_TREE_BIN option to the Makefile, and update the documentation. Usage is something like: make DEV_TREE_BIN=boot/am335x-boneblack-pubkey.dtb Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-05kbuild: use cmd_shipped instead of cmd_copyMasahiro Yamada
We already have cmd_shipped in scripts/Makefile.lib. Use it rather than defining a new command cmd_copy. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-28kbuild: fix bugs in cleaning targetsMasahiro Yamada
"make clean", "make clobber", "make mrproper" and "make distclean" missed to clean-up some files when they were run with O=<some_dir> option. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Wolfgang Denk <wd@denx.de>
2014-02-19dts: generate multiple device tree blobsMasahiro Yamada
It is convenient to have all device trees on the same SoC compiled. It allows for later easy repackaging without the need to re-run the make file. - Build device trees with the same SoC under arch/$(ARCH)/dts - Copy the one specified by CONFIG_DEFAULT_DEVICE_TREE or DEVICE_TREE=... to dts/dt.dtb Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-19dts: move device tree sources to arch/$(ARCH)/dts/Masahiro Yamada
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>
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-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-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>
2013-12-13Makefile: use two double-quotations as a pairMasahiro Yamada
Some editors such as Emacs can highlight source files. But their parser algorithm is not perfect. If you use one double-quotation alone, some editor cannot handle it nicely and mark source lines as a string by mistake. It is preferable to use two double-quotations as a pair. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-01dts, api, test: convert makefiles to Kbuild styleMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-08-02dts/Makefile: pass -undef -D__DTS__ to cppStephen Warren
This brings U-Boot's cpp invocation into line with the way the Linux kernel invokes cpp on device trees. Consistency will be useful to ensure *.dts is portable between the two. -undef also has the added advantage of not defining "linux", so DT property names such as "linux,keymap" don't get mangled. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-08-02dts/Makefile: don't use cpp -PStephen Warren
Recent dtc supports #line directives in the input source code, and even uses them to generate useful line numbers in any messages it emits. Stop passing -P to cpp, since there's no need any more. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-08-02dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTSStephen Warren
Now that nothing uses the defines ARCH_CPU_DTS, BOARD_DTS, stop defining them. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-08-02dts/Makefile: unify cpp/dtc include pathsStephen Warren
*.dts may use #include (via cpp) or /include/ (via dtc; assuming a newer dtc). The choice is up to the creator of the DT. Create a common variable DTC_INCDIRS that lists the paths searched by include statements, and update cpp and dtc invocation to use them. For cpp, also specify -nostdinc to ensure the same set of paths is available to both type of include statement. For dtc, create a new DTC_FLAGS variable to hold all the flags passed to dtc. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-08-02dts/Makefile: simplify dtc invocationStephen Warren
The invocation of dtc is significantly more complex that it could be, in order to work around an issue on old versions of dtc, which print a message to stdout every time they run. Remove this workaround, on the assumption that people have or will upgrade to a newer version of dtc. This simplifies the build rule significantly. Related, split the invocation of cpp and dtc into separate commands rather than a pipeline, so that if either fail, it is detected. This has the nice benefit of saving off the result of the pre-processing step, allowing it to be easily inspected. Assuming a new enough dtc (which an earlier patch enforces), dtc will parse #line directives in its input file, and generate correct file and line numbers in error messages, even though cpp is unconditionally applied to its input file. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-04-02dts/Makefile: Build the user specified dtsJagannadha Sutradharudu Teki
This patch provides a support to build the user specified dts. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-03-14Tegra: fdt: Change /include/ to #include for C preprocessorTom Warren
dts Makefile has the arch & board include paths added to DTS_CPPFLAGS. This allows the use of '#include "xyz"' in the dts/dtsi file which helps the C preprocessor find common dtsi include files. Signed-off-by: Tom Warren <twarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-02-07fdt: fix dts preprocessor optionsAllen Martin
Using "-ansi" preprocessor option will cause dts lines that begin with '#' to choke the preprocessor. Change to "-x assembler-with-cpp" instead which is what the kernel uses to preprocess dts files. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2012-08-10dts/Makefile: Turn off some predefined macrosHorst Kronstorfer
Add '-ansi' to DTS_CPPFLAGS to avoid unwanted expansion of dts content that matches some predefined macros. Example: A number of PowerPC related *.dts files in the kernel define a property named 'linux,network-index' which (w/o '-ansi') is expanded to '1,network-index' by the preprocessor because of '#define linux 1.' Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
2012-08-10dts/Makefile: Check for empty $(LDSCRIPT)Horst Kronstorfer
Make sure that $(LDSCRIPT) is not empty before calling process_lds with 'cat $(LDSCRIPT)' else cat will block waiting for input from stdin. Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
2012-07-31Merge branch 'master' of git://git.denx.de/u-boot-microblazeWolfgang Denk
* 'master' of git://git.denx.de/u-boot-microblaze: microblaze: Wire up SPI driver spi: microblaze: Adds driver for Xilinx SPI controller microblaze: intc: Clear interrupt code microblaze: Call serial multi initialization microblaze: Move __udelay implementation microblaze: Remove extern from board.c microblaze: Wire up dts configuration fdt: Add board specific dts inclusion microblaze: Move individual board linker scripts to common script in cpu tree. microblaze: Add gpio.h microblaze: Add missing undefs for UBI and UBIFS microblaze: Expand and correct configuration comments microblaze: Enable ubi support microblaze: Avoid compile error on systems without cfi flash microblaze: Remove wrong define CONFIG_SYS_FLASH_PROTECTION Conflicts: drivers/spi/Makefile Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-07-10fdt: Add board specific dts inclusionStephan Linz
Some architectures, for example Microblaze, doesn't need a splitted device tree because every Microblaze hw design is different. The individuell Microblaze device tree will be auto generated by FPGA design tools and could be used directly with dtc. The auto generated dts for Microblaze can not processed by CPP. Unfortunately that is the default procedure in U-Boot to merge a splitted device tree (substitution of ARCH_CPU_DTS). Microblaze will never use the ARCH_CPU_DTS substitution and we introduce the new board specific substitution variable BOARD_DTS that points into vendor/board/dts subdir with the file name of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single include line that can processed by CPP: /include/ BOARD_DTS Signed-off-by: Stephan Linz <linz@li-pro.net> Tested-by: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
2012-04-21fdt: avoid bad MAKEALL statusWolfgang Denk
Current versions of dtc always print a message like DTC: dts->dtb on file "dt.dtb.tmp" which cannot even be suppressed with "-qqq". To avoid incorrect MAKEALL status, we manually filter out this message. This is a bit complicated, as we have to make sure to set a correct return code. Also, get rid of the temp file: dtc accepts "-" for stdin. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2012-04-21fdt: fix out of tree builds with DT supportWolfgang Denk
Fix: FATAL ERROR: Couldn't open "../arch/arm/dts/tegra20.dtsi": No such file or directory Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2012-07-09fdt: send all dtc output to stderrStephen Warren
Commit 896bbb5 "fdt: avoid bad MAKEALL status" added logic to capture the result code from dtc by echoing $? to stdout and capturing it using $(). However, dtc emits some diagnostics to stderr and some to stdout. The diagnostics send to stdout ended up getting captured via $() rather than being echo'd to the user. This caused those diagnostics to be passed to the exit command, which would then fail with the following cryptic error message: /bin/sh: line 1: exit: too many arguments Solve this by redirecting all dtc output to stderr so that $() does not capture it. This allows the user to see the actual error message from dtc. Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: albert.u.boot@aribaud.net Cc: Tom Warren <twarren@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2011-10-26fdt: Add support for embedded device tree (CONFIG_OF_EMBED)Simon Glass
This new option allows U-Boot to embed a binary device tree into its image to allow run-time control of peripherals. This device tree is for U-Boot's own use and is not necessarily the same one as is passed to the kernel. The device tree compiler output should be placed in the $(obj) rooted tree. Since $(OBJCOPY) insists on adding the path to the generated symbol names, to ensure consistency it should be invoked from the directory where the .dtb file is located and given the input file name without the path. This commit contains my entry for the ugliest Makefile / shell interaction competition. Signed-off-by: Simon Glass <sjg@chromium.org>