colibri_imx6: fix linker issue when enabling watchdog
cover colibri_imx6: fix linker issue when enabling watchdog
Building colibri_imx6 target with watchdog enabled fails.
The first patch in this series fixes the problem, the second one adds a new defconfig with watchdog enabled.
Best Regards,
Andreas Aegerter (2):
colibri_imx6: fix linker issue enabling watchdog
colibri_imx6: add default config with watchdog enabled
board/toradex/colibri_imx6/MAINTAINERS | 4 + board/toradex/colibri_imx6/colibri_imx6.c | 4 +- configs/colibri_imx6_wdg_defconfig | 124 ++++++++++++++++++++++ 3 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 configs/colibri_imx6_wdg_defconfig
Signature · 1 line
2.39.2
PATCH 1/2 colibri_imx6: fix linker issue enabling watchdog
Using colibri_imx6_defconfig with additionally CONFIG_WATCHDOG, CONFIG_WDT and CONFIG_IMX_WATCHDOG enabled results in a linker error.
arm-linux-gnueabihf-ld.bfd: arch/arm/lib/reset.o: in function `do_reset':/home/aegerter-1/u-boot/arch/arm/lib/reset.c:42: undefined reference to `reset_cpu'
Define reset_cpu() also outside of SPL.
--- board/toradex/colibri_imx6/colibri_imx6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/toradex/colibri_imx6/colibri_imx6.c +2 -2
@@ -1116,12 +1116,12 @@ int board_fit_config_name_match(const char *name) }#endif +#endif /* CONFIG_SPL_BUILD */ +void reset_cpu (void ) { } -#endif /* CONFIG_SPL_BUILD */ -static struct mxc_serial_plat mxc_serial_plat = { .reg = (struct mxc_uart *)UART1_BASE , .use_dte = true,
Signature · 1 line
2.39.2
PATCH 2/2 colibri_imx6: add default config with watchdog enabled
In reply to Andreas AegerterThis config is based on colibri_imx6_defconfig and enables additionally the watchdog. The intend of the new config is that distros can use this in the future and the behaviour will not be changed for current users.
However I am not sure if it would be OK, to just enable the watchdog in the existing colibri_imx6_defconfig. Any suggestions?
--- board/toradex/colibri_imx6/MAINTAINERS | 4 + configs/colibri_imx6_wdg_defconfig | 124 +++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 configs/colibri_imx6_wdg_defconfig
board/toradex/colibri_imx6/MAINTAINERS +4 -0
@@ -9,3 +9,7 @@ F: configs/colibri_imx6_defconfig F: arch/arm/dts/imx6dl-colibri-eval-v3.dts F: arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi F: arch/arm/dts/imx6qdl-colibri.dtsi + +M: Andreas Aegerter <[email protected]> +S: Maintained +F: configs/colibri_imx6_wdg_defconfig
configs/colibri_imx6_wdg_defconfig new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
2.39.2
Re: [PATCH v1 2/2] colibri_imx6: add default config with watchdog enabled
Quoted 3 lines · Andreas Aegerter
This config is based on
colibri_imx6_defconfigand enables additionally the watchdog. The intend of the new config is that distros can use this in the future and the behaviour will not be changed for current users.
IMO in general is a bad idea to duplicate a defconfig for the same board, you just duplicate the maintenance effort.
Quoted 2 lines
However I am not sure if it would be OK, to just enable the watchdog in the existing
colibri_imx6_defconfig. Any suggestions?
I wonder what would be the implication of enabling it by default on the general defconfig.
What about using a debugger or kgdb from Linux?
What is the watchdog timeout once you enable it? Can we be sure that the OS will be able to start in time to refresh the watchdog?
Francesco
RE: EXTERNAL - [PATCH v1 2/2] colibri_imx6: add default config with watchdog enabled
Quoted 4 lines · Francesco Dolcini
Quoted 3 lines · Andreas Aegerter
This config is based on
colibri_imx6_defconfigand enables additionally the watchdog. The intend of the new config is that distros can use this in the future and the behaviour will not be changed for
Quoted 8 lines
current users.
IMO in general is a bad idea to duplicate a defconfig for the same board, you just duplicate the maintenance effort.Quoted 2 lines
However I am not sure if it would be OK, to just enable the watchdog in the existing
colibri_imx6_defconfig. Any suggestions?I wonder what would be the implication of enabling it by default on the general defconfig.
One implication of this is that if the kernel does not support the watchdog and therefore does not reset it regularly, the system will reboot every 128 seconds. That's the main reason why I propose creating a new defconfig.
Quoted 4 lines
What about using a debugger or kgdb from Linux?
What is the watchdog timeout once you enable it? Can we be sure that the OS will be able to start in time to refresh the watchdog?
Timeout is 128 seconds (default value if CONFIG_WATCHDOG_TIMEOUT_MSECS is not set). This should be enough to boot an embedded device. For debugger I recommend to use an u-boot image where the watchdog is not enabled.
Quoted 2 lines
Francesco
Andreas