xilinx_zynqmp.h: erroneous(?) "#define CONFIG_PANIC_HANG"

Robert P. J. Day rpjday at crashcourse.ca
Tue Dec 17 15:17:35 CET 2019


  long story short, colleague came to me with a petalinux project
wherein the compile of u-boot was failing due to a redefinition of the
macro "CONFIG_PANIC_HANG" ... rather than mess with petalinux, i just
set up the current master of u-boot (aarch64), used the same
configuration and, sure enough:

  CC      lib/asm-offsets.s
In file included from include/config.h:5,
                 from include/common.h:23,
                 from lib/asm-offsets.c:14:
include/configs/xilinx_zynqmp.h:97: warning: "CONFIG_PANIC_HANG" redefined
 #define CONFIG_PANIC_HANG

In file included from ././include/linux/kconfig.h:4,
                 from <command-line>:
include/generated/autoconf.h:410: note: this is the location of the previous definition
 #define CONFIG_PANIC_HANG 1

  it would *appear* that this is because xilinx_zynqmp.h defines:

  #define CONFIG_PANIC_HANG

but that symbol has been migrated to the Kconfig system, lib/Kconfig:

  config PANIC_HANG
    bool "Do not reset the system on fatal error"
      help
        Define this option to stop the system in case of a fatal error,
        so that you have to reset it manually. This is probably NOT a good
        idea for an embedded system where you want the system to reboot
        automatically as fast as possible, but it may be useful during
        development since you can try to debug the conditions that lead to
        the situation.

  is it safe to assume that this is the problem? i can certainly see
how that combination would generate two different macro definitions,
and it's just our luck that it seems that is the only header file that
does that.

rday



More information about the U-Boot mailing list