mirror of
https://github.com/feyisay07/meta-bsp-imx8mm.git
synced 2026-09-24 06:10:13 +01:00
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From 486ddc5f04efb9755d8b8ea07b9067ff35b21ed3 Mon Sep 17 00:00:00 2001
|
|
From: Kirill Kapranov <kirill.kapranov@compulab.co.il>
|
|
Date: Sat, 18 Apr 2020 19:17:47 +0300
|
|
Subject: [PATCH 032/126] env: Add env_mmcdev variable handling
|
|
|
|
Handle the variable env_mmcdev the following way:
|
|
If the variable is set to an unsigned value, an actual environment is to be
|
|
written to the mmc device of the given number; otherwise work as usal, save the
|
|
environment to a boot device.
|
|
|
|
Signed-off-by: Kirill Kapranov <kirill.kapranov@compulab.co.il>
|
|
---
|
|
board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c
|
|
index 97331e55d9..fca256439b 100644
|
|
--- a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c
|
|
+++ b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c
|
|
@@ -546,7 +546,14 @@ int board_init(void)
|
|
|
|
int board_mmc_get_env_dev(int devno)
|
|
{
|
|
- return devno - 1;
|
|
+ const ulong user_env_devno = env_get_hex("env_mmcdev", ULONG_MAX);
|
|
+ if (user_env_devno != ULONG_MAX) {
|
|
+ printf("User Environment DevNo is set: Save environmet on MMC(%lu)\n", user_env_devno);
|
|
+ return (int)user_env_devno;
|
|
+ }
|
|
+ else {
|
|
+ return devno - 1;
|
|
+ }
|
|
}
|
|
|
|
int mmc_map_to_kernel_blk(int devno)
|
|
--
|
|
2.11.0
|
|
|