victronenergy / venus

Victron Energy Unix/Linux OS
https://github.com/victronenergy/venus/wiki
568 stars 70 forks source link

bbb: start watchdog from u-boot #73

Closed mpvader closed 7 years ago

mpvader commented 7 years ago

right now (I assume that) the bootloader is only started from userland. And therefore not protecting against hangs while starting Linux.

This same issue exists for the ccgx: #74

Some links:

jhofstee commented 7 years ago

hello Matthijs,

Starting the watchdog is already done in u-boot. However linux disables it directly again. We can prevent that if we want https://github.com/victronenergy/linux/commit/b3f0c4a6f188a04609a2e561f031c85d07b73826. Assigning to @mansr.

Mans, any thought on this?

jhofstee commented 7 years ago

@mansr

lets back-port these: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/watchdog/omap_wdt.c?id=b2102eb36e7909c779e46f66595fda75aa219f4c https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/watchdog/omap_wdt.c?id=8605fec1ce2a397f738f1c394be7847dacf31b0c

It boils down to same thing, but there is a bootparam to control behavior so we can make sure it is only enabled when booting from onboard mmc and not when updating etc.

jhofstee commented 7 years ago

included in v2.01~10. You need to opt-in for keeping the watchdog alive during boot, see https://github.com/victronenergy/meta-victronenergy/commit/69f38b3beeb6ba98bbe688dc49a627c45b5d1fc4