fdt: Add -q option to fdt addr for distro_bootcmd
authorPeter Hoyes <Peter.Hoyes@arm.com>
Thu, 31 Mar 2022 10:53:22 +0000 (11:53 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 22 Apr 2022 19:44:10 +0000 (15:44 -0400)
commite9496ec37440ab22acf569e7ac3316732a6b8af4
tree0869dd54d8e882f79129894f97ade79a57a7aaa3
parent9de612ae4ded53f742f5f99929c06d0839471ced
fdt: Add -q option to fdt addr for distro_bootcmd

distro_bootcmd uses this construct a few times to test $fdt_addr_r,
and fall back on $fdtcontroladdr if not set/invalid:

    if fdt addr ${fdt_addr_r}; then
        ...
    else
        ...
    fi

If the `fdt addr` test fails, it prints the following  message on the
console, suggesting there is an error when there is not:

    libfdt fdt_check_header(): FDT_ERR_BADMAGIC

To remove this potentially confusing error message, this patch adds -q
as a 'quiet' option for fdt addr, and uses this flag in
config_distro_bootcmd.h

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
cmd/fdt.c
include/config_distro_bootcmd.h