summaryrefslogtreecommitdiffstats
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index b93fb45c8f..eae389d049 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2451,10 +2451,26 @@ static bool dbg_boot_data(void)
info.scroll_all = true;
simplelist_info_init(&info, "Boot data", 1, NULL);
simplelist_set_line_count(0);
- simplelist_addline("Magic: %.8s", boot_data.magic);
+ crc = crc_32(boot_data.payload, boot_data.length, 0xffffffff);
+#if defined(HAVE_MULTIBOOT)
+ char rootpath[VOL_MAX_LEN+2] = RB_ROOT_CONTENTS_DIR;
+ int boot_volume = 0;
+ if(crc == boot_data.crc)
+ {
+ boot_volume = boot_data.boot_volume; /* boot volume contained in uint8_t payload */
+ get_redirect_dir(rootpath, sizeof(rootpath), boot_volume, "", "");
+ rootpath[path_strip_trailing_separators(rootpath,NULL)] = '\0';
+ }
+ simplelist_addline("Boot Volume: <%lu>", boot_volume);
+ simplelist_addline("Root:");
+ simplelist_addline("%s", rootpath);
+ simplelist_addline("");
+#endif
+ simplelist_addline("Bootdata RAW:");
+ if (crc != boot_data.crc)
+ simplelist_addline("Magic: %.8s", boot_data.magic);
simplelist_addline("Length: %lu", boot_data.length);
simplelist_addline("CRC: %lx", boot_data.crc);
- crc = crc_32(boot_data.payload, boot_data.length, 0xffffffff);
(crc == boot_data.crc) ? simplelist_addline("CRC: OK!") :
simplelist_addline("CRC: BAD");
for (unsigned i = 0; i < boot_data.length; i += 4)
@@ -2466,7 +2482,7 @@ static bool dbg_boot_data(void)
info.hide_selection = true;
return simplelist_show_list(&info);
}
-#endif
+#endif /* defined(HAVE_BOOTDATA) && !defined(SIMULATOR) */
/****** The menu *********/
static const struct {