From 1ce74e21131c6e6aafa654b680a269a52e6ae138 Mon Sep 17 00:00:00 2001 From: Karol Trzcinski Date: Wed, 19 Aug 2020 13:18:03 +0200 Subject: [PATCH 1/2] logger: Enable LDC and FW compatibility check by default By default user should use compatible files. Signed-off-by: Karol Trzcinski --- tools/logger/logger.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tools/logger/logger.c b/tools/logger/logger.c index 0f5445dd181f..bbd7baa65556 100644 --- a/tools/logger/logger.c +++ b/tools/logger/logger.c @@ -39,8 +39,6 @@ static void usage(void) fprintf(stdout, "%s:\t -l *.ldc_file\t\t*.ldc files generated by smex\n", APP_NAME); fprintf(stdout, "%s:\t -p \t\t\tInput from stdin\n", APP_NAME); - fprintf(stdout, "%s:\t -e \t\t\tEnable checking firmware version with " - "default verification file\n", APP_NAME); fprintf(stdout, "%s:\t -v ver_file\t\tEnable checking firmware version " "with ver_file file\n", APP_NAME); fprintf(stdout, "%s:\t -c clock\t\tSet timestamp clock in MHz\n", @@ -161,7 +159,7 @@ static int append_filter_config(struct convert_config *config, const char *input int main(int argc, char *argv[]) { - static const char optstring[] = "ho:i:l:ps:c:u:tev:rd:Lf:gF:"; + static const char optstring[] = "ho:i:l:ps:c:u:tv:rd:Lf:gF"; struct convert_config config; unsigned int baud = 0; const char *snapshot_file = 0; @@ -177,9 +175,9 @@ int main(int argc, char *argv[]) config.ldc_fd = NULL; config.input_std = 0; /* checking fw version is disabled by default */ - config.version_file = NULL; + config.version_file = "/sys/kernel/debug/sof/fw_version"; config.version_fd = NULL; - config.version_fw = 0; + config.version_fw = 1; config.use_colors = 1; config.serial_fd = -EINVAL; config.raw_output = 0; @@ -215,13 +213,6 @@ int main(int argc, char *argv[]) case 'p': config.input_std = 1; break; - case 'e': - /* enabling checking fw version with default verification - * file - */ - config.version_fw = 1; - config.version_file = "/sys/kernel/debug/sof/fw_version"; - break; case 'u': baud = atoi(optarg); break; @@ -230,7 +221,6 @@ int main(int argc, char *argv[]) break; case 'v': /* enabling checking fw version with ver_file file */ - config.version_fw = 1; config.version_file = optarg; break; case 'L': From 68462670061b497ed8ec3f692bbdc4e3b63e8be0 Mon Sep 17 00:00:00 2001 From: Karol Trzcinski Date: Wed, 19 Aug 2020 13:25:30 +0200 Subject: [PATCH 2/2] logger: Add option to disable firmware compatibility check It may be needed for situation when user have firmware after small fixes without updated ldc file or fw_ready file is not accessible. Option dedicated for advanced users. Signed-off-by: Karol Trzcinski --- tools/logger/logger.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/logger/logger.c b/tools/logger/logger.c index bbd7baa65556..4ddf9cba7eca 100644 --- a/tools/logger/logger.c +++ b/tools/logger/logger.c @@ -41,6 +41,8 @@ static void usage(void) fprintf(stdout, "%s:\t -p \t\t\tInput from stdin\n", APP_NAME); fprintf(stdout, "%s:\t -v ver_file\t\tEnable checking firmware version " "with ver_file file\n", APP_NAME); + fprintf(stdout, "%s:\t -n\t\t\tDisable checking firmware version\n", + APP_NAME); fprintf(stdout, "%s:\t -c clock\t\tSet timestamp clock in MHz\n", APP_NAME); fprintf(stdout, "%s:\t -s state_name\t\tTake a snapshot of state\n", @@ -159,7 +161,7 @@ static int append_filter_config(struct convert_config *config, const char *input int main(int argc, char *argv[]) { - static const char optstring[] = "ho:i:l:ps:c:u:tv:rd:Lf:gF"; + static const char optstring[] = "ho:i:l:ps:c:u:tv:rd:Lf:gFn"; struct convert_config config; unsigned int baud = 0; const char *snapshot_file = 0; @@ -223,6 +225,9 @@ int main(int argc, char *argv[]) /* enabling checking fw version with ver_file file */ config.version_file = optarg; break; + case 'n': + config.version_fw = 0; + break; case 'L': config.hide_location = 1; break;