From dab58853877ea157bcf55a41e5587061ecb525e0 Mon Sep 17 00:00:00 2001 From: Rakesh Kumar Date: Tue, 25 Feb 2025 19:06:15 +0530 Subject: [PATCH] patch-u-boot-env: optimize patch-u-boot-env service execution Update patch-u-boot-env.service to set the U-Boot environment (e.g., watchdog_timeout_ms=60000) earlier and more reliably during boot.With the special case when watchdog_timeout_ms value set as '0' patch-u-boot-env.service ExecStart is not executing the 'fw_setenv watchdog_timeout_ms 60000' in this case patch-u-boot-env.service is getting failed in setting the watchdog_timeout_ms as 60000. Running the service after 'local-fs.target' and 'systemd-udev-settle.service' is letting the block device intialize ready to run the fw_setenv command. Signed-off-by: Rakesh Kumar --- recipes-bsp/patch-u-boot-env/files/patch-u-boot-env.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-bsp/patch-u-boot-env/files/patch-u-boot-env.service b/recipes-bsp/patch-u-boot-env/files/patch-u-boot-env.service index 0e6c860f2..57b723f5a 100644 --- a/recipes-bsp/patch-u-boot-env/files/patch-u-boot-env.service +++ b/recipes-bsp/patch-u-boot-env/files/patch-u-boot-env.service @@ -8,11 +8,14 @@ [Unit] Description=update u-boot environment for swupdate +After=local-fs.target systemd-udev-settle.service Conflicts=shutdown.target Before=swupdate.service shutdown.target +DefaultDependencies=no [Service] Type=oneshot +RemainAfterExit=yes ExecStart=sh -c '/usr/share/u-boot-env/patch-u-boot-env.sh watchdog_timeout_ms /usr/share/u-boot-env/patch-u-boot-env.config; fw_setenv watchdog_timeout_ms 60000' ExecStartPost=-/bin/systemctl disable patch-u-boot-env.service