From c9857098ac0a3173d5d03baa3c32d9a8e29faec8 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 3 Mar 2022 22:08:28 -0500 Subject: Multiboot Firmware Root Redirect - WIP Loads external drive into root namespace Root Redirects can now be put into different folders For instance placing '/_test' into SD1/rockbox_main. will redirect to /<1>/_test/.rockbox Debug menu>Bootdata now has root directory listed in addition to RAW Bootdata Redirect root work from Michael Sevakis g#1556, RESTORED -> g#4256 Change-Id: Ia97cf50ff5f5b440877f9c005da6f12c53af931e --- apps/debug_menu.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apps/debug_menu.c') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 3a9218bc84..1b341a96e4 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -128,6 +128,9 @@ #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) #include "bootdata.h" +#include "rbpaths.h" +#include "pathfuncs.h" +#include "rb-loader.h" #endif static const char* threads_getname(int selected_item, void *data, @@ -2530,12 +2533,17 @@ static bool dbg_boot_data(void) simplelist_set_line_count(0); 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:"); -- cgit v1.2.3