[PATCH] ARM: i.MX: Fix overwriting defaultenv with zii board specific env
Sascha Hauer
s.hauer at pengutronix.de
Fri Mar 26 12:01:02 GMT 2021
zii_imx7d_dev_init() lacks a protection against running on the wrong
hardware. Add it so that the defaultenv no longer gets overwritten with
a board specific variant.
Fixes: 31300d79e8 ("ARM: zii-common: Add common environment directory")
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/boards/zii-imx7d-dev/board.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boards/zii-imx7d-dev/board.c b/arch/arm/boards/zii-imx7d-dev/board.c
index 6b409e23b7..5f7314b0b8 100644
--- a/arch/arm/boards/zii-imx7d-dev/board.c
+++ b/arch/arm/boards/zii-imx7d-dev/board.c
@@ -54,6 +54,8 @@ static int zii_imx7d_dev_init(void)
barebox_set_hostname("rpu2");
else if (of_machine_is_compatible("zii,imx7d-rmu2"))
barebox_set_hostname("rmu2");
+ else
+ return 0;
defaultenv_append_directory(defaultenv_zii_common);
--
2.29.2
More information about the barebox
mailing list