From f403ae6e97081c05e447f0a765e89da26ae75ec4 Mon Sep 17 00:00:00 2001 From: Gitanjali Krishna Date: Thu, 2 Apr 2020 12:02:09 -0700 Subject: [PATCH] minidump: Add u-boot env variable to test minidump To test minidump feature, we require a method to collect full dump and minidump binaries on a single run for side by side comparison. This change enables dumping of minidump and full dump binaries consecutively when uboot env variable 'dump_minimal_and_full' is set. Change-Id: I846084546d3c67398d7ef7b81e87c97bcc63c609 Signed-off-by: Gitanjali Krishna --- board/qca/arm/common/crashdump.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/board/qca/arm/common/crashdump.c b/board/qca/arm/common/crashdump.c index a3efdfcd98..6da019088c 100644 --- a/board/qca/arm/common/crashdump.c +++ b/board/qca/arm/common/crashdump.c @@ -714,8 +714,16 @@ void dump_func(unsigned int dump_level) printf("\nHit any key within 10s to stop dump activity..."); while (!tstc()) { /* while no incoming data */ if (get_timer_masked() >= etime) { - if (do_dumpqca_data(dump_level) == CMD_RET_FAILURE) - printf("Crashdump saving failed!\n"); + if (getenv("dump_minimal_and_full")) { + /* dump minidump and full dump*/ + if (do_dumpqca_data(MINIMAL_DUMP) == CMD_RET_FAILURE) + printf("Minidump saving failed!\n"); + if (do_dumpqca_data(FULL_DUMP) == CMD_RET_FAILURE) + printf("Crashdump saving failed!\n"); + } else { + if (do_dumpqca_data(dump_level) == CMD_RET_FAILURE) + printf("Crashdump saving failed!\n"); + } break; } }