fix(watchdog): service hardware watchdog during initramfs crypt setup - #693
fix(watchdog): service hardware watchdog during initramfs crypt setup#693colpane wants to merge 2 commits into
Conversation
|
@huaqianli could you check please :) |
73391f2 to
8812b79
Compare
|
I suspect you are using a larger encrypted disk setup than the example image, because the missing watchdog petting during encryption should have otherwise already been noticed. I would split setting |
Actually, I'm using eMMC @jan-kiszka. Sure, I'm splitting into two different commits. |
But the question is how large your encrypted partition is on that setup. By default, it should only be an empty /var, not the read-only rootfs or some prefilled data partitions. |
got it now, then, yes, it is larger on my side :) |
8812b79 to
6cd05cb
Compare
You're right, and I checked the logs to confirm.
However, the size is not the small nominal partition from the 2795008 × 4k ≈ 10.66 GiB, vs. the 2G nominal size in the wks file — so on first boot we're doing LUKS format + TPM2 enrollment + mke2fs on a ~10.66 GiB partition instead of a small empty one. That's almost certainly why the missing watchdog petting became visible for us and possibly wasn't for the reference setup. One more thing worth noting: our timeout is 60s because U-Boot arms the hardware watchdog with that value before handing off to Linux ( |
|
Adding
If you are referring to isar-cip-core: No, we do not test this because there is still no watchdog that qemu-system-aarch64 can emulate via its virt machine and U-Boot understands out of the box. Maybe worth looking into that again, though. An alternative would be enabling the real AM62x platform for CI image testing. |
|
|
WDOG_TIMEOUT was set in iot2050-image-base.bb, so it only applied when that recipe was used. Move it to iot2050.conf so it applies regardless of which image recipe is used. Signed-off-by: Enes Colpan <enes.colpan@siemens.com>
WDOG_TIMEOUT only configures EFI Boot Guard's own watchdog handling and does not stop U-Boot from independently arming the hardware watchdog. INITRAMFS_WATCHDOG_DEVICE was left unset, so the initramfs crypt-hook never serviced it during the lengthy TPM2/LUKS partition setup on first boot, causing the device to hard-reset mid-encryption if setup exceeded the bootloader-armed timeout. Signed-off-by: Enes Colpan <enes.colpan@siemens.com>
6cd05cb to
ac61990
Compare
WDOG_TIMEOUT only configures EFI Boot Guard's own watchdog handling and does not stop U-Boot from independently arming the hardware watchdog. INITRAMFS_WATCHDOG_DEVICE was left unset, so the initramfs crypt-hook never serviced it during the lengthy TPM2/LUKS partition setup on first boot, causing the device to hard-reset mid-encryption if setup exceeded the bootloader-armed timeout.
Move WDOG_TIMEOUT from iot2050-image-base.bb to iot2050.conf so it applies regardless of which image recipe is used, and add INITRAMFS_WATCHDOG_DEVICE=/dev/watchdog so the crypt-hook keeps the hardware watchdog alive during setup.