On 27.11.22 11:20, Johannes Kastl wrote:
Hi Michal, hi all,
On 26.11.22 at 20:14 Johannes Kastl wrote:
On 26.11.22 at 19:42 Michal Suchánek wrote:
It might be worth trying to enable watchdog in u-boot so the board
reboots automatically if the boot fails.
I'll search for how to enable that, thanks for the hint, Michal!
Is it just me or is the documentation on u-boot... let's say, challenging?
"The code is enough documentation" :-P
I find lots of funny lines that someone apparently has to add somewhere
to configure/enable the watchdog. But I fail to find clear instructions
what needs to be done where.
It seems to me I need to somehow recompile u-boot with enabled watchdog?
How do I use this on the Pine64? How does it end up in that special 8kB
in sector 16 of the sdcard?
AFAICT from the build logs of hardware:boot/u-boot (checked flavours
pine64plus and pineh64), the watchdog drivers are built.
Also, your boot logs show that the drivers are available (at least
that's how I interpret it):
| U-Boot 2022.10 (Oct 04 2022 - 00:00:00 +0000) Allwinner Technology
|
| CPU: Allwinner A64 (SUN50I)
| Model: Pine64+
| DRAM: 2 GiB
| Core: 68 devices, 20 uclasses, devicetree: separate
| WDT: Not starting watchdog@1c20ca0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
now the U-boot doc/usage/cmd/wdt.rst says different things about the
"wdt" command, that you could play with.
Note that the U-Boot "shell" might tickle the watchdog while it is
interactively waiting for input, so to test if the watchdog triggers,
you might need to create some kind of inifinite loop.
If you found a command that starts the watchdog to your liking, you need
to put this somehow into your boot command, before the mmc scan and grub
load stuff is executed.
You could also try to just put "reset" as the last command in your boot
sequence, so that if booting fails (and without mmc and stuff it should
fail?) the board just resets and tries again...
But that will only help for the "it fails in U-Boot already" case. If it
fails in grub2, then you'd need to find out how to make grub2 reset
instead of dropping to the shell in case of errors.
Good luck :-)
--
Stefan Seyfried
"For a successful technology, reality must take precedence over
public relations, for nature cannot be fooled." -- Richard Feynman