mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] boot: fix systemd watchdog command line argument
@ 2025-02-20  9:17 Sascha Hauer
  2025-02-20 12:06 ` Ahmad Fatoum
  2025-02-21 13:20 ` Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-02-20  9:17 UTC (permalink / raw)
  To: Barebox List

The kernel command line option to specify the watchdog to use is
"systemd.watchdog_device" as specified in [1], not
"systemd.watchdog-device"

[1] https://www.freedesktop.org/software/systemd/man/latest/kernel-command-line.html#systemd.watchdog_sec=

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/oftree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/oftree.c b/common/oftree.c
index 4afe955719..2ebde791c7 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -172,7 +172,7 @@ static void watchdog_build_bootargs(struct watchdog *watchdog, struct device_nod
 	if (alias_id < 0)
 		return;
 
-	buf = basprintf("systemd.watchdog-device=/dev/watchdog%d", alias_id);
+	buf = basprintf("systemd.watchdog_device=/dev/watchdog%d", alias_id);
 	if (!buf)
 		return;
 
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] boot: fix systemd watchdog command line argument
  2025-02-20  9:17 [PATCH] boot: fix systemd watchdog command line argument Sascha Hauer
@ 2025-02-20 12:06 ` Ahmad Fatoum
  2025-02-20 17:45   ` Ahmad Fatoum
  2025-02-21 13:20 ` Sascha Hauer
  1 sibling, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2025-02-20 12:06 UTC (permalink / raw)
  To: Sascha Hauer, Barebox List

On 20.02.25 10:17, Sascha Hauer wrote:
> The kernel command line option to specify the watchdog to use is
> "systemd.watchdog_device" as specified in [1], not
> "systemd.watchdog-device"
> 
> [1] https://www.freedesktop.org/software/systemd/man/latest/kernel-command-line.html#systemd.watchdog_sec=
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Please also include the typo fix in the common/Kconfig help text for
CONFIG_SYSTEMD_OF_WATCHDOG.

With that squashed:

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

I could swear I have tested this with two watchdogs back then...

Anyways, I have submitted a fix to the systemd documentation here:
https://github.com/systemd/systemd/pull/36453

Thanks,
Ahmad


> ---
>  common/oftree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/oftree.c b/common/oftree.c
> index 4afe955719..2ebde791c7 100644
> --- a/common/oftree.c
> +++ b/common/oftree.c
> @@ -172,7 +172,7 @@ static void watchdog_build_bootargs(struct watchdog *watchdog, struct device_nod
>  	if (alias_id < 0)
>  		return;
>  
> -	buf = basprintf("systemd.watchdog-device=/dev/watchdog%d", alias_id);
> +	buf = basprintf("systemd.watchdog_device=/dev/watchdog%d", alias_id);
>  	if (!buf)
>  		return;
>  


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] boot: fix systemd watchdog command line argument
  2025-02-20 12:06 ` Ahmad Fatoum
@ 2025-02-20 17:45   ` Ahmad Fatoum
  0 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-02-20 17:45 UTC (permalink / raw)
  To: Sascha Hauer, Barebox List

On 20.02.25 13:06, Ahmad Fatoum wrote:
> On 20.02.25 10:17, Sascha Hauer wrote:
>> The kernel command line option to specify the watchdog to use is
>> "systemd.watchdog_device" as specified in [1], not
>> "systemd.watchdog-device"
>>
>> [1] https://www.freedesktop.org/software/systemd/man/latest/kernel-command-line.html#systemd.watchdog_sec=
>>
>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> Please also include the typo fix in the common/Kconfig help text for
> CONFIG_SYSTEMD_OF_WATCHDOG.
> 
> With that squashed:
> 
> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> 
> I could swear I have tested this with two watchdogs back then...

Turns out, you can replace an underscore with a dash in all systemd
kernel options and they will behave identically:
https://github.com/systemd/systemd/pull/36453#discussion_r1963693274

> Anyways, I have submitted a fix to the systemd documentation here:
> https://github.com/systemd/systemd/pull/36453

And it's merged. It's a good idea for barebox to be aligned with the
current systemd documentation, but it's reassuring to learn that
this was not buggy to begin with. :)

Cheers,
Ahmad

> 
> Thanks,
> Ahmad
> 
> 
>> ---
>>  common/oftree.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/oftree.c b/common/oftree.c
>> index 4afe955719..2ebde791c7 100644
>> --- a/common/oftree.c
>> +++ b/common/oftree.c
>> @@ -172,7 +172,7 @@ static void watchdog_build_bootargs(struct watchdog *watchdog, struct device_nod
>>  	if (alias_id < 0)
>>  		return;
>>  
>> -	buf = basprintf("systemd.watchdog-device=/dev/watchdog%d", alias_id);
>> +	buf = basprintf("systemd.watchdog_device=/dev/watchdog%d", alias_id);
>>  	if (!buf)
>>  		return;
>>  
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] boot: fix systemd watchdog command line argument
  2025-02-20  9:17 [PATCH] boot: fix systemd watchdog command line argument Sascha Hauer
  2025-02-20 12:06 ` Ahmad Fatoum
@ 2025-02-21 13:20 ` Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-02-21 13:20 UTC (permalink / raw)
  To: Barebox List, Sascha Hauer


On Thu, 20 Feb 2025 10:17:43 +0100, Sascha Hauer wrote:
> The kernel command line option to specify the watchdog to use is
> "systemd.watchdog_device" as specified in [1], not
> "systemd.watchdog-device"
> 
> [1] https://www.freedesktop.org/software/systemd/man/latest/kernel-command-line.html#systemd.watchdog_sec=
> 
> 
> [...]

Applied, thanks!

[1/1] boot: fix systemd watchdog command line argument
      https://git.pengutronix.de/cgit/barebox/commit/?id=e11b5d8e5216 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-21 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-20  9:17 [PATCH] boot: fix systemd watchdog command line argument Sascha Hauer
2025-02-20 12:06 ` Ahmad Fatoum
2025-02-20 17:45   ` Ahmad Fatoum
2025-02-21 13:20 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox