From: Fiona Klute Date: Wed, 12 Feb 2025 11:39:01 +0000 (+0100) Subject: Raspberry Pi: Keep warnings from firmware in DT, if any X-Git-Tag: v2025.04-rc5~12^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc7a3110184a3ca4c227675b20d3a4887210e36c;p=pandora-u-boot.git Raspberry Pi: Keep warnings from firmware in DT, if any The /chosen/user-warnings property is created by the RPi firmware if there are warnings to report, keep it to make debugging easier. For example, if the firmware config.txt contains "dtoverlay=error-example" and that example references an undefined symbol "&nosuchdev" the warning can be read after boot: $ cat /proc/device-tree/chosen/user-warnings dterror: can't find symbol 'nosuchdev' Failed to resolve overlay 'error-example' Signed-off-by: Fiona Klute Reviewed-by: Matthias Brugger Signed-off-by: Peter Robinson --- diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index fe6153b388b..43efb0dbc1d 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -594,6 +594,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) /* kernel address randomisation seed as provided by the firmware */ copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed"); + /* warnings from the firmware (if any) */ + copy_property(fdt, fw_fdt, "/chosen", "user-warnings"); + /* address of the PHY device as provided by the firmware */ copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); }