RZ-G/RZG2 uboot

From eLinux.org
< RZ-G
Revision as of 15:01, 28 October 2020 by Cbrandt (talk | contribs) (Added Starting Watchdog Timer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Starting Watchdog Timer

Remember to (" setenv wdt_timeout <seconds> ") before testing if you want board to reboot sooner. Otherwise, it will reboot after 1min due to the setting in the Device Tree.

Testing Phase:
Case 1: (which user replaces the wrong kernel Image or wrong dtb) In this case, we are going to use 1 random kernel Image, and 1 device tree ( .dtb ) for our board. For example: R-car M3 kernel Image + r8a774e1-hihope-rzg2h-ex.dtb.

Expected result: Board will stop at (" Starting kernel ..... ") due to the wrong kernel Image file. Board will reboot after the specified time which is set by user.

Case 2: (when loading a driver, kernel panic occurs because of loading driver fail and board stops booting) In this case, we will add a panic() function into one function of a driver such as probe() to create kernel panic, but make sure that you have included kernel.h to use this function.

For example: In the GPIO driver

#include <linux/kernel.h> 
static int gpio_rcar_probe(struct platform_device *pdev) 
    struct gpio_rcar_priv *p; 
    struct resource *io, *irq; 
    struct gpio_chip *gpio_chip; 
    panic("GPIO driver, Kernel panic\n"); 

Expected result: When loading GPIO driver, kernel panic occurs and board stops booting. Board will reboot after the specified time which is set by user.