[OpenWrt-Devel] [PATCH] Add support for C-style in dtsi files
nbd at openwrt.org
Thu Dec 3 09:10:30 EST 2015
On 2015-12-03 00:42, Nikolay Martynov wrote:
> Current way of compuling dts files involves calling C preprocessor on
> main dts file only. This means that dtsi includes cannot have C-style includes.
> This patch addresses this problem. It uses approach similar to one
> use in linux kernel: it preprocesses all dtsi's in current dir into
> tmp dir and then uses that tmp dir as include dir for main dts compilation.
> Note: this patch preprocesses onlt *.dtsi, not *.dts, so only *.dtsi
> can be includes, but it looks like all current architectures follow this convention.
> This approach should be compatible with all current architectures.
> This patch also updates ramips arch to use new dtsi comilation code.
> Signed-off-by: Nikolay Martynov <mar.kolya at gmail.com>
> include/image.mk | 22 +++++++++++++++++-----
> target/linux/ramips/image/Makefile | 2 +-
> 2 files changed, 18 insertions(+), 6 deletions(-)
> --- a/target/linux/ramips/image/Makefile
> +++ b/target/linux/ramips/image/Makefile
> @@ -39,7 +39,7 @@ define Device/Default
> define Build/patch-dtb
> - $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@.dtb ../dts/$(DTS).dts
> + $(call Image/BuildDTB,../dts/$(DTS).dts,$@.dtb,-I$(LINUX_DIR)/arch/mips/boot/dts -I$(LINUX_DIR)/arch/mips/boot/dts/include)
Why did you add those -I options? Isn't that already handled by the
common preprocessor options in Image/PreprocessDTS?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel