Message ID | 1ca36fad-6c54-4453-acf2-64758187c682@theobroma-systems.com |
---|---|
State | Not Applicable |
Delegated to: | Kever Yang |
Headers | show |
Series | Error building PX30 Ringneck with WDT support | expand |
Hi Quentin, On 11/15/23 19:00, Quentin Schulz wrote: > Hi all, > > I'm trying to add watchdog support to the PX30 Ringneck board but it > fails to compile: > > """ > diff --git a/configs/ringneck-px30_defconfig > b/configs/ringneck-px30_defconfig > index b314636b4d9..3dab0dab5d4 100644 > --- a/configs/ringneck-px30_defconfig > +++ b/configs/ringneck-px30_defconfig > @@ -122,6 +122,10 @@ CONFIG_USB_EHCI_HCD=y > CONFIG_USB_EHCI_GENERIC=y > CONFIG_USB_GADGET=y > CONFIG_USB_GADGET_DWC2_OTG=y > +# CONFIG_WATCHDOG is not set > +# CONFIG_WATCHDOG_AUTOSTART is not set > +CONFIG_DESIGNWARE_WATCHDOG=y > +CONFIG_WDT=y > CONFIG_SPL_TINY_MEMSET=y > CONFIG_TPL_TINY_MEMSET=y > CONFIG_LZO=y > """ > > $ make CROSS_COMPILE="aarch64-linux-gnu-" ringneck-px30_defconfig > $ make CROSS_COMPILE="aarch64-linux-gnu-" > [...] > /usr/bin/aarch64-linux-gnu-ld.bfd: lib/time.o: in function `udelay': > /home/qschulz/work/upstream/u-boot/lib/time.c:199: undefined reference > to `schedule' > /home/qschulz/work/upstream/u-boot/lib/time.c:199:(.text.udelay+0x1c): > relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol > `schedule' > make[1]: *** [scripts/Makefile.spl:527: tpl/u-boot-tpl] Error 1 > make: *** [Makefile:2073: tpl/u-boot-tpl] Error 2 > > FWIW, I had this kept on a downstream U-Boot (v2022.10, on top of: > https://git.theobroma-systems.com/ringneck-u-boot.git/log/?h=v2022.10-ringneck) and it both compiled and worked. I assume this may be related to the "new" cyclic support? This seems very likely. > Looking for pointers as somehow I don't really understand the error. > schedule() definition seems to be existing in headers included in > lib/time.c so a bit clueless at the moment. Probably related to TPL also > as it doesn't fail in neither proper nor SPL build stages it seems. Correct. I assume that this cyclic / WDT support was never used / implemented with TPL. Could you please take a deeper look at this to see, where exactly the problem originates. Thanks, Stefan
diff --git a/configs/ringneck-px30_defconfig b/configs/ringneck-px30_defconfig index b314636b4d9..3dab0dab5d4 100644 --- a/configs/ringneck-px30_defconfig +++ b/configs/ringneck-px30_defconfig @@ -122,6 +122,10 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DWC2_OTG=y +# CONFIG_WATCHDOG is not set +# CONFIG_WATCHDOG_AUTOSTART is not set +CONFIG_DESIGNWARE_WATCHDOG=y +CONFIG_WDT=y CONFIG_SPL_TINY_MEMSET=y CONFIG_TPL_TINY_MEMSET=y CONFIG_LZO=y