mirror of
https://github.com/feyisay07/meta-bsp-imx8mm.git
synced 2026-09-24 06:10:13 +01:00
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
From 754cce3320e6c237684530a6611cd8ad78cda536 Mon Sep 17 00:00:00 2001
|
|
From: Valentin Raevsky <valentin@compulab.co.il>
|
|
Date: Wed, 8 Jul 2020 08:10:42 +0300
|
|
Subject: [PATCH 042/126] mcm-imx8m-mini: env: Add an option to print the
|
|
machine env devices
|
|
|
|
Signed-off-by: Valentin Raevsky <valentin@compulab.co.il>
|
|
---
|
|
tools/env/fw_env_main.c | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
|
|
index 1d193bd437..ebd18b40ba 100644
|
|
--- a/tools/env/fw_env_main.c
|
|
+++ b/tools/env/fw_env_main.c
|
|
@@ -49,6 +49,7 @@ static struct option long_options[] = {
|
|
{"noheader", no_argument, NULL, 'n'},
|
|
{"lock", required_argument, NULL, 'l'},
|
|
{"version", no_argument, NULL, 'v'},
|
|
+ {"env", no_argument, NULL, 'e'},
|
|
{NULL, 0, NULL, 0}
|
|
};
|
|
|
|
@@ -74,6 +75,7 @@ void usage_printenv(void)
|
|
#endif
|
|
" -n, --noheader do not repeat variable name in output\n"
|
|
" -l, --lock lock node, default:/var/lock\n"
|
|
+ " -e, --env print default fw_env.config\n"
|
|
"\n");
|
|
}
|
|
|
|
@@ -120,7 +122,7 @@ static void parse_common_args(int argc, char *argv[])
|
|
env_opts.config_file = CONFIG_FILE;
|
|
#endif
|
|
|
|
- while ((c = getopt_long(argc, argv, ":a:c:l:h:v", long_options, NULL)) !=
|
|
+ while ((c = getopt_long(argc, argv, ":a:c:l:h:v:e", long_options, NULL)) !=
|
|
EOF) {
|
|
switch (c) {
|
|
#ifdef CONFIG_FILE
|
|
@@ -139,6 +141,11 @@ static void parse_common_args(int argc, char *argv[])
|
|
fprintf(stderr, "Compiled with " U_BOOT_VERSION "\n");
|
|
exit(EXIT_SUCCESS);
|
|
break;
|
|
+ case 'e':
|
|
+ fprintf(stdout, "/dev/mmcblk2boot0 0x%x 0x%x\n", CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE);
|
|
+ fprintf(stdout, "/dev/mmcblk1 0x%x 0x%x\n", CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE);
|
|
+ exit(EXIT_SUCCESS);
|
|
+ break;
|
|
default:
|
|
/* ignore unknown options */
|
|
break;
|
|
--
|
|
2.11.0
|
|
|