summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-01-22 18:01:55 -0800
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-09-29 06:10:21 +0200
commitf9461b41fe306ad4eedb6b5d17ea9e43d1ab3f92 (patch)
tree9bb24923e3a1971ada42e447cd2bd485464d2d19 /common
parent34fcaeec51fa3f519a13eb8d127abea1853e77e5 (diff)
common/board_r: make should_load_env weak
Make should_load_env a weak function. This allows a board to decide whether to load the environment or not. This can be useful when detecting recovery mode to avoid loading hostile environments. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'common')
-rw-r--r--common/board_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/board_r.c b/common/board_r.c
index b1ad6058e7..26ea942497 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -425,8 +425,8 @@ static int initr_dataflash(void)
* important, since no verification is done on the environment.
*
* @return 0 if environment should not be loaded, !=0 if it is ok to load
- */
-static int should_load_env(void)
+ */
+__weak int should_load_env(void)
{
#ifdef CONFIG_OF_CONTROL
return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 1);