Hello, I have a problem when adding a new board to openSUSE (DE0-nano-SoC). The upstream u-boot for that board enables the watchdog with a 30 seconds timeout. That causes the board to get reset during the system partition resizing at first startup. To get watchdog support enabled I added the dw_wdt kernel module in config.sh to the dracut config. That is not enough, some service needs to use the driver to periodically trigger the watchdog (systemd, etc.). Is there a way to get that at the fist startup phase while the installation is completed? https://build.opensuse.org/package/show/home:frank_kunz:branches:openSUSE:Fa... Br, Frank -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Montag, 23. Januar 2017 20:56:06 CET Frank Kunz wrote:
Hello,
I have a problem when adding a new board to openSUSE (DE0-nano-SoC). The upstream u-boot for that board enables the watchdog with a 30 seconds timeout. That causes the board to get reset during the system partition resizing at first startup. To get watchdog support enabled I added the dw_wdt kernel module in config.sh to the dracut config. That is not enough, some service needs to use the driver to periodically trigger the watchdog (systemd, etc.). Is there a way to get that at the fist startup phase while the installation is completed?
https://build.opensuse.org/package/show/home:frank_kunz:branches:openSUSE:Fa ctory:ARM/JeOS-socfpgade0nanosoc
According to the buildlog, dw_wdt has been removed from the initial initrd: osc rbl home:frank_kunz:branches:openSUSE:Factory:ARM JeOS-socfpgade0nanosoc factory armv7l | grep dw_wdt [ 400s] Deleting unwanted module: /kernel-tree/4.9.4-1-default/kernel/ drivers/watchdog/dw_wdt.ko It might be sufficient to add the following in the Images.kiwi.in at the appropriate position: #if IS_FLAVOR_socfpgade0nanosoc <file name="drivers/watchdog/dw_wdt.ko"/> <!-- WDT is enabled by u-boot --> #endif Kind regards, Stefan -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 23.01.2017 um 21:10 schrieb Brüns, Stefan:
On Montag, 23. Januar 2017 20:56:06 CET Frank Kunz wrote:
Hello,
I have a problem when adding a new board to openSUSE (DE0-nano-SoC). The upstream u-boot for that board enables the watchdog with a 30 seconds timeout. That causes the board to get reset during the system partition resizing at first startup. To get watchdog support enabled I added the dw_wdt kernel module in config.sh to the dracut config. That is not enough, some service needs to use the driver to periodically trigger the watchdog (systemd, etc.). Is there a way to get that at the fist startup phase while the installation is completed?
https://build.opensuse.org/package/show/home:frank_kunz:branches:openSUSE:Fa ctory:ARM/JeOS-socfpgade0nanosoc
According to the buildlog, dw_wdt has been removed from the initial initrd:
osc rbl home:frank_kunz:branches:openSUSE:Factory:ARM JeOS-socfpgade0nanosoc factory armv7l | grep dw_wdt [ 400s] Deleting unwanted module: /kernel-tree/4.9.4-1-default/kernel/ drivers/watchdog/dw_wdt.ko
It might be sufficient to add the following in the Images.kiwi.in at the appropriate position:
#if IS_FLAVOR_socfpgade0nanosoc <file name="drivers/watchdog/dw_wdt.ko"/> <!-- WDT is enabled by u-boot --> #endif
I tested that and the module is no more deleted: [ 959s] Jan-23 20:38:33 <1> : Added following drivers: [ 959s] Jan-23 20:38:33 <1> : --> drivers/dma/* [ 959s] Jan-23 20:38:33 <1> : --> drivers/gpu/* [ 959s] Jan-23 20:38:33 <1> : --> drivers/mmc/card/* [ 959s] Jan-23 20:38:33 <1> : --> drivers/mmc/host/* [ 959s] Jan-23 20:38:33 <1> : --> drivers/phy/* [ 959s] Jan-23 20:38:33 <1> : --> drivers/regulator/* [ 959s] Jan-23 20:38:33 <1> : --> drivers/watchdog/dw_wdt.ko But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog. Is there a possibility to add that to the boot initrd? Br, Frank -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi, Am 24.01.2017 um 17:30 schrieb Frank Kunz:
But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog.
See https://en.opensuse.org/HCL:Turris_Omnia for an example solution. I used /etc/init.d/boot.local for quick local testing.
Is there a possibility to add that to the boot initrd?
If you package a systemd service unit, you can add it to your packages list in Images.kiwi.in. But since you're the one building U-Boot you might also just patch that out on the U-Boot side. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 24.01.2017 um 18:29 schrieb Andreas Färber:
Hi,
Am 24.01.2017 um 17:30 schrieb Frank Kunz:
But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog.
See https://en.opensuse.org/HCL:Turris_Omnia for an example solution. I used /etc/init.d/boot.local for quick local testing.
I will try that first, but it needs util-linux which brings beside wdctl a lot of other things.
Is there a possibility to add that to the boot initrd?
If you package a systemd service unit, you can add it to your packages list in Images.kiwi.in.
not sure if I understood it correct, but does the first boot initrd use systemd? To me it looks that it brings some kiwi init script instead of.
But since you're the one building U-Boot you might also just patch that out on the U-Boot side.
I tried to send some first patch that disabled the watchdog in uboot, and it got rejected. There are concerns that the system could hang during the boot, and I got also the answer that 30 seconds should be more than enough to bring the OS up. Br, Frank -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 24.01.2017 um 19:49 schrieb Frank Kunz <mailinglists@kunz-im-inter.net>:
Am 24.01.2017 um 18:29 schrieb Andreas Färber: Hi,
Am 24.01.2017 um 17:30 schrieb Frank Kunz: But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog.
See https://en.opensuse.org/HCL:Turris_Omnia for an example solution. I used /etc/init.d/boot.local for quick local testing.
I will try that first, but it needs util-linux which brings beside wdctl a lot of other things.
I would assume we already have that inside the kiwi initrd. Kiwi also executes hook scripts that we already populate (for SPL flashing, GPT wiggling, etc). Inside those you could just kick the watchdog once. When you do that, please don't check for the board but rather the existence of /dev/watchdog. That way we also have it (hopefully) fixed for other systems that use watchdogs. Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 25.01.2017 um 09:24 schrieb Alexander Graf:
Am 24.01.2017 um 19:49 schrieb Frank Kunz <mailinglists@kunz-im-inter.net>:
Am 24.01.2017 um 18:29 schrieb Andreas Färber: Hi,
Am 24.01.2017 um 17:30 schrieb Frank Kunz: But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog.
See https://en.opensuse.org/HCL:Turris_Omnia for an example solution. I used /etc/init.d/boot.local for quick local testing.
I will try that first, but it needs util-linux which brings beside wdctl a lot of other things.
I would assume we already have that inside the kiwi initrd. Kiwi also executes hook scripts that we already populate (for SPL flashing, GPT wiggling, etc). Inside those you could just kick the watchdog once.
When you do that, please don't check for the board but rather the existence of /dev/watchdog. That way we also have it (hopefully) fixed for other systems that use watchdogs.
So far I found out there are two possible hooks (preHWdetect, postHWdetect) that might be called before the filesystem resize step done with tunefs. The watchdog needs to get pinged before that point. But they are not called because the OEMInstall function exits at that point: if [ ! -f $VMX_SYSTEM ];then return fi before the hooks are called. So there are no hooks that can be used. I think by that Kiwi needs to be adapted, or did I miss some option? Br, Frank -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 26.01.2017 um 22:44 schrieb Frank Kunz <mailinglists@kunz-im-inter.net>:
Am 25.01.2017 um 09:24 schrieb Alexander Graf:
Am 24.01.2017 um 19:49 schrieb Frank Kunz <mailinglists@kunz-im-inter.net>:
Am 24.01.2017 um 18:29 schrieb Andreas Färber: Hi,
Am 24.01.2017 um 17:30 schrieb Frank Kunz: But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog.
See https://en.opensuse.org/HCL:Turris_Omnia for an example solution. I used /etc/init.d/boot.local for quick local testing.
I will try that first, but it needs util-linux which brings beside wdctl a lot of other things.
I would assume we already have that inside the kiwi initrd. Kiwi also executes hook scripts that we already populate (for SPL flashing, GPT wiggling, etc). Inside those you could just kick the watchdog once.
When you do that, please don't check for the board but rather the existence of /dev/watchdog. That way we also have it (hopefully) fixed for other systems that use watchdogs.
So far I found out there are two possible hooks (preHWdetect, postHWdetect) that might be called before the filesystem resize step done with tunefs. The watchdog needs to get pinged before that point. But they are not called because the OEMInstall function exits at that point:
if [ ! -f $VMX_SYSTEM ];then return fi
before the hooks are called. So there are no hooks that can be used. I think by that Kiwi needs to be adapted, or did I miss some option?
Let's ask Marcus :) Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 24.01.2017 um 18:29 schrieb Andreas Färber:
Hi,
Am 24.01.2017 um 17:30 schrieb Frank Kunz:
But the watchdog triggers anyway during the system partition rewrite. So nothing pings the watchdog during that operation. I think there is still a service missing that pings the watchdog.
See https://en.opensuse.org/HCL:Turris_Omnia for an example solution. I used /etc/init.d/boot.local for quick local testing.
The wiki page contains wdctl as the tool that can be used for watchdog ping. But there is no recipe how to get it working by the image install. Do you have some more detail of your quick test? Br, Frank
Is there a possibility to add that to the boot initrd?
If you package a systemd service unit, you can add it to your packages list in Images.kiwi.in.
But since you're the one building U-Boot you might also just patch that out on the U-Boot side.
Regards, Andreas
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (4)
-
Alexander Graf
-
Andreas Färber
-
Brüns, Stefan
-
Frank Kunz