aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-02-09 23:53:47 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-02-10 15:39:00 +0100
commitef0416666f48e1e7793c4230cec18c8cdd3e1003 (patch)
treea4603be57d81a74f6e64ad7a8771346c29d322f2 /package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch
parentf142de5f44bcba8cb0f12e5b1fd26cd9867cf866 (diff)
downloadupstream-ef0416666f48e1e7793c4230cec18c8cdd3e1003.tar.gz
upstream-ef0416666f48e1e7793c4230cec18c8cdd3e1003.tar.bz2
upstream-ef0416666f48e1e7793c4230cec18c8cdd3e1003.zip
uboot-sunxi: fix build by adding comparabilities for old dtc
We use the dtc from the kernel and that does not have all the options which u-boot would like to use now. make these parameters optional. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch')
-rw-r--r--package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch b/package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch
new file mode 100644
index 0000000000..1b88de3e2a
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/220-compatible-old-dtc.patch
@@ -0,0 +1,52 @@
+Revert the commit c0e032e0090d65 ("scripts/dtc: Update to upstream
+version v1.4.3")
+OpenWrt uses the dtc from the kernel also in u-boot, but when we compile
+against kernel 4.9 we run into some errors because it is too old now.
+Add the options only when they are supported to make it compatible with
+dtc from kernel 4.9.
+
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -172,6 +172,11 @@ ld-version = $(shell $(LD) --version | $
+ # Usage: $(call ld-ifversion, -ge, 22252, y)
+ ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
+
++# dtc-option
++# Usage: DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
++dtc-option = $(call try-run,\
++ echo '/dts-v1/; / {};' | $(DTC) $(1),$(1),$(2))
++
+ ######
+
+ ###
+--- a/scripts/Makefile.extrawarn
++++ b/scripts/Makefile.extrawarn
+@@ -58,8 +58,8 @@ endif
+
+ KBUILD_CFLAGS += $(warning)
+
+-dtc-warning-2 += -Wnode_name_chars_strict
+-dtc-warning-2 += -Wproperty_name_chars_strict
++dtc-warning-2 += $(call dtc-option,-Wnode_name_chars_strict)
++dtc-warning-2 += $(call dtc-option,-Wproperty_name_chars_strict)
+
+ dtc-warning := $(dtc-warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+ dtc-warning += $(dtc-warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+@@ -70,11 +70,11 @@ DTC_FLAGS += $(dtc-warning)
+ else
+
+ # Disable noisy checks by default
+-DTC_FLAGS += -Wno-unit_address_vs_reg
+-DTC_FLAGS += -Wno-simple_bus_reg
+-DTC_FLAGS += -Wno-unit_address_format
+-DTC_FLAGS += -Wno-pci_bridge
+-DTC_FLAGS += -Wno-pci_device_bus_num
+-DTC_FLAGS += -Wno-pci_device_reg
++DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
++DTC_FLAGS += $(call dtc-option,-Wno-simple_bus_reg)
++DTC_FLAGS += $(call dtc-option,-Wno-unit_address_format)
++DTC_FLAGS += $(call dtc-option,-Wno-pci_bridge)
++DTC_FLAGS += $(call dtc-option,-Wno-pci_device_bus_num)
++DTC_FLAGS += $(call dtc-option,-Wno-pci_device_reg)
+
+ endif