U-Boot: arm the watchdog (CONFIG_WATCHDOG_AUTOSTART) #34
Labels
No labels
blocked-physical
cleanup
hardware
infra
kernel
P1-critical
P2-high
P3-normal
P4-later
reliability
security
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tiagoagueda/a80#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The sunxi watchdog is compiled into U-Boot and never started, so a hang in U-Boot
proper is terminal on a board with no remote power control.
Measured
From
~/a80/u-boot/.configon ouranos (HEAD6a561883):Everything needed is already there.
drivers/watchdog/Kconfig:14carriesdefault n if ARCH_SUNXI, so the symbol is off by platform default rather than byany decision made here.
Why it is safe
Checked before proposing, because an armed watchdog crossing into the kernel could
otherwise cause a reset loop:
wdt_stop_all()has exactly one caller in the tree (board/alliedtelesis/x530/x530.c:126),so U-Boot does not disarm the watchdog at
bootm. It stays armed into the kernel.sunxi_wdt_probe()callssunxi_wdt_stop()before registering the device(
drivers/watchdog/sunxi_wdt.c), so the kernel disarms it at probe.Net effect: protection covers U-Boot, is handed off cleanly, and no reset loop is
possible. The kernel also has
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=yas a second net.Change
CMD_WDTis worth having so the watchdog can be exercised from the U-Boot promptrather than only by inducing a hang.
Does not cover
idle loop, so a prompt looks healthy to it. That is the
BOOT_RETRYissue.Acceptance
wdt listat the U-Boot prompt shows the device armed.dmesgstill showssunxi-wdtprobing andsystemd re-arming
watchdog0.Addresses gaps 2 and 3 of 41-production-plan.md.
Done 2026-08-28. Exactly the two symbols this issue specified.
Two things the analysis here did not predict, both good:
matter for #37, which arms the same R_WDT in SPL and hands it to this.
rather than assuming - an armed 16 s watchdog could have made interactive serial recovery
impossible. Proven incidentally while testing #35, where the board sat at
=>for a full60 s without resetting.
The handoff is as this issue described: Linux disarms in
sunxi_wdt_probe()and systemdre-arms at 15 s. See
50-uboot-resilience.md.