1
0
Fork 0
forked from len0rd/rockbox
foxbox/firmware/common
William Wilgus e9de9c1452 Add boot from other volumes in bootloader on targets with HAVE_MULTIVOLUME
Adds the ability to load firmware from other drives on MULTIVOLUME targets
Mihail Zenkov <mihail.zenkov@gmail.com> had posted a hard coded patch
to allow this on several Sansa players, I made it more universal

Redirect file rockbox_main.<name> should placed in root of
drive you would like to be main, if this file empty or there a single
slash '/' firmware will be loaded from /.rockbox in root of this drive
If instead a /<*DIRECTORY*> is supplied in rockbox_main.<name> then
firmware will be loaded from /<dir>/.rockbox/

NOTES*

The directory can have multiple levels however..
leading slash MUST be included
trailing slash can be omitted
(eg. /test/.rockbox would be simply '/test' in the redirect file)

Redirect file will not work on internal drive (whatever is default boot drive)

Volume with the highest index containing redirect file will be loaded
first.

Firmware file is checked for boot data region, if missing, firmware
image will not be loaded.

On failure or if no redirect file is found load will fallback to
internal drive

Currently only Sansa Fuze+, Sansa Clip+,
Sansa Clip Zip, Sansa Fuzev2, and Sansa Fuzev1 are implemented.

Players (with HAVE_MULTIVOLUME)
will need #define HAVE_BOOTDATA and #define BOOT_REDIR "rockbox_main.<name>"
added to their config file

boot_data is implemented in crt0.s file (See g#1552)
ARM and IMX233 have aleady been implemented

Once these conditions are met <HAVE_MULTIBOOT> will be defined by config.h

Partitions on the drives are able to have a redirect as
well.

Change-Id: Iada3263919f6bcad7d0d7d8279b4239aafa07ee9
2017-10-29 17:53:04 +01:00
..
config.c Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). 2010-05-06 21:04:40 +00:00
crc32-mi4.c crc-mi4: use const lookup table for crc 2014-07-07 12:54:50 +02:00
crc32-rkw.c Add RKW firmware file format loader 2012-03-04 00:34:26 +01:00
crc32.c buflib: Add crc field protecting buflib cookie integrity 2014-01-16 10:17:39 +01:00
diacritic.c FS#11187 - diacritic.c is in 'drivers' but it does not belong there 2010-04-07 20:41:18 +00:00
dir.c Restore dircache hookup in the database ramcache. 2017-02-10 05:05:23 -05:00
dircache.c Dircache: Improve freed name memory recallocation 2017-03-21 23:11:55 -04:00
disk.c Fix a bug in disk.c that really wasn't affecting anything. 2017-02-06 02:25:22 -05:00
disk_cache.c Do some housekeeping with fat.h and SECTOR_SIZE 2017-03-12 22:05:44 -04:00
file.c Remove FF_CREAT and FF_EXCL flags in from file code. 2017-02-14 17:54:50 -05:00
file_internal.c Dircache: Refine name allocation and error handling. 2017-03-12 21:09:16 -04:00
fileobj_mgr.c Do some debug and preparatory work for ramcache and playlist 2017-01-17 14:35:36 -05:00
format.c format/*printf: Add simple support for %p format specifier. 2011-08-04 10:44:41 +00:00
linked_list.c Optimize lld_remove() a bit 2017-04-13 18:59:45 -04:00
loader_strerror.c Move load_firmware() to separate file 2013-06-27 13:50:11 +02:00
pathfuncs.c Add some comments about the behavior of a couple path functions. 2017-02-07 02:45:26 -05:00
rb-loader.c Add boot from other volumes in bootloader on targets with HAVE_MULTIVOLUME 2017-10-29 17:53:04 +01:00
strcasecmp.c Compile fix for mingw-w64 2011-12-04 21:07:06 +00:00
strcasestr.c Added ID3 searching 2005-01-27 22:21:08 +00:00
strlcat.c Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). 2010-05-06 21:04:40 +00:00
strlcpy.c Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). 2010-05-06 21:04:40 +00:00
strnatcmp.c Remove tabs in firmware path (taking into account the original spacing). 2010-02-22 21:24:09 +00:00
structec.c Fix warning in firmware/common/structec.c 2015-02-24 16:27:16 -05:00
timefuncs.c Move intrinsic RTC implmentation differences to driver files 2017-01-26 23:07:49 -05:00
unicode.c unicode: Fix getle16 and getbe16 2014-09-21 07:42:49 +02:00
version.c Prevent spurious recompiles on account of changed version. 2014-08-28 15:48:56 +02:00