mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
multiboot: Allow searching in volume 0 for redirect file
Searching in volume 0 is necessary for multiboot targets with only one drive, like the M3K/Q1/ErosQ. Without this the search code will never look at the redirect file on these targets. The search bound is configured with a setting MULTIBOOT_MIN_VOLUME, which defaults to 0, but is defined to 1 for Sansa players so they keep their old behavior. Change-Id: I6dc5cf98db4258731de2c68c3ab1182b4a4a655b
This commit is contained in:
parent
df3afcfa3b
commit
bcbb5a8b00
8 changed files with 13 additions and 1 deletions
|
@ -106,7 +106,7 @@ int load_firmware(unsigned char* buf, const char* firmware, int buffer_size)
|
||||||
* 0 is the default boot volume, it is not checked here
|
* 0 is the default boot volume, it is not checked here
|
||||||
* if found <volume>/rockbox_main.<playername> and firmware
|
* if found <volume>/rockbox_main.<playername> and firmware
|
||||||
* has a bootdata region this firmware will be loaded */
|
* has a bootdata region this firmware will be loaded */
|
||||||
for (unsigned int i = NUM_VOLUMES - 1; i > 0 && ret < 0; i--)
|
for (int i = NUM_VOLUMES - 1; i >= MULTIBOOT_MIN_VOLUME && ret < 0; i--)
|
||||||
{
|
{
|
||||||
if (get_redirect_dir(filename, sizeof(filename), i,
|
if (get_redirect_dir(filename, sizeof(filename), i,
|
||||||
BOOTDIR, firmware) > 0)
|
BOOTDIR, firmware) > 0)
|
||||||
|
|
|
@ -869,6 +869,12 @@ Lyre prototype 1 */
|
||||||
#define HAVE_MULTIBOOT
|
#define HAVE_MULTIBOOT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* The lowest numbered volume to read a multiboot redirect from; default is to
|
||||||
|
* allow any volume but some targets may wish to exclude the internal drive. */
|
||||||
|
#if defined(HAVE_MULTIBOOT) && !defined(MULTIBOOT_MIN_VOLUME)
|
||||||
|
# define MULTIBOOT_MIN_VOLUME 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NUM_DRIVES
|
#ifndef NUM_DRIVES
|
||||||
#define NUM_DRIVES 1
|
#define NUM_DRIVES 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#define HAVE_BOOTDATA
|
#define HAVE_BOOTDATA
|
||||||
/* define boot redirect file name allows booting from external drives */
|
/* define boot redirect file name allows booting from external drives */
|
||||||
#define BOOT_REDIR "rockbox_main.clip+"
|
#define BOOT_REDIR "rockbox_main.clip+"
|
||||||
|
#define MULTIBOOT_MIN_VOLUME 1
|
||||||
|
|
||||||
#define HAVE_MULTIDRIVE
|
#define HAVE_MULTIDRIVE
|
||||||
#define NUM_DRIVES 2
|
#define NUM_DRIVES 2
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#define HAVE_BOOTDATA
|
#define HAVE_BOOTDATA
|
||||||
/* define boot redirect file name allows booting from external drives */
|
/* define boot redirect file name allows booting from external drives */
|
||||||
#define BOOT_REDIR "rockbox_main.clipzip"
|
#define BOOT_REDIR "rockbox_main.clipzip"
|
||||||
|
#define MULTIBOOT_MIN_VOLUME 1
|
||||||
|
|
||||||
#define HAVE_MULTIDRIVE
|
#define HAVE_MULTIDRIVE
|
||||||
#define NUM_DRIVES 2
|
#define NUM_DRIVES 2
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
/* define boot redirect file name allows booting from external drives */
|
/* define boot redirect file name allows booting from external drives */
|
||||||
#define BOOT_REDIR "rockbox_main.e200"
|
#define BOOT_REDIR "rockbox_main.e200"
|
||||||
|
#define MULTIBOOT_MIN_VOLUME 1
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
#define HAVE_RECORDING
|
#define HAVE_RECORDING
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
/* define boot redirect file name allows booting from external drives */
|
/* define boot redirect file name allows booting from external drives */
|
||||||
#define BOOT_REDIR "rockbox_main.fuze"
|
#define BOOT_REDIR "rockbox_main.fuze"
|
||||||
|
#define MULTIBOOT_MIN_VOLUME 1
|
||||||
|
|
||||||
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
|
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#define HAVE_BOOTDATA
|
#define HAVE_BOOTDATA
|
||||||
/* define boot redirect file name allows booting from external drives */
|
/* define boot redirect file name allows booting from external drives */
|
||||||
#define BOOT_REDIR "rockbox_main.fuze+"
|
#define BOOT_REDIR "rockbox_main.fuze+"
|
||||||
|
#define MULTIBOOT_MIN_VOLUME 1
|
||||||
|
|
||||||
// HW can do it but we don't have the IRAM for mix buffers
|
// HW can do it but we don't have the IRAM for mix buffers
|
||||||
//#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
|
//#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
/* define boot redirect file name allows booting from external drives */
|
/* define boot redirect file name allows booting from external drives */
|
||||||
#define BOOT_REDIR "rockbox_main.fuze2"
|
#define BOOT_REDIR "rockbox_main.fuze2"
|
||||||
|
#define MULTIBOOT_MIN_VOLUME 1
|
||||||
|
|
||||||
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
|
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue