[PATCH 2/2] kbuild: don't warn about reg formatting
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Nov 29 23:03:20 PST 2023
Overlays, especially new style ones, are prone to trigger the reg
formatting warnings if fragments add node with reg properties without
also patching the parent:
&phy0 {
reg = <7>;
};
In order to add #address-cells and #size-cells, the parent would need to
be overlaid, which is a bad tradeoff as it's either redundant or it
overrides the existing cell count with the wrong ones, possibly
invalidating reg parsing for existing nodes.
Improve the situation and avoid false positives by silencing the warnings
when building device tree overlays.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
scripts/Makefile.lib | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 8aa49b1ee1b0..0b236babb275 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -371,6 +371,8 @@ ifeq ($(CONFIG_OF_OVERLAY_LIVE), y)
DTC_FLAGS.dtb += -@
endif
+DTC_FLAGS.dtbo += -Wno-avoid_default_addr_size -Wno-reg_format
+
# Generate an assembly file to wrap the output of the device tree compiler
quiet_cmd_dt_S_dtb = DTB $@
cmd_dt_S_dtb = $(srctree)/scripts/gen-dtb-s $(subst -,_,$(*F)) $< $(CONFIG_IMD) > $@
--
2.39.2
More information about the barebox
mailing list