Loads external drive into root namespace
Root Redirects can now be put into different folders
For instance placing '/_test' into SD1/rockbox_main.<playername>
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
Provide definitions for the macros:
* RB_ROOT_VOL_HIDDEN(v) to exclude certain items from the root.
* RB_ROOT_CONTENTS to return a string with the name of the
directory to mount in the root.
Defaults are in export/rbpaths.h
It's a bit much for those that don't need the full functionality.
Some conditional define can cut it back a lot to cut out things only
needed if alternate root mounts are required. I'm just not bothering
yet. The basic concept would be applied to all targets to keep file
code from forking too much.
Change-Id: I3b5a14c530ff4b10d97f67636237d96875eb8969
Author: Michael Sevakis
There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.
Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.
Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
I feel this is probably unlikely to be called with a NULL pointer
for cachep but being that we are already doing the check why not
guard file_cache_reset as well
Change-Id: I1a13767ef28a4129ae3513f7aa999fb6c1d6fad8
This will eventually be used by the ZIP module and other things
that support DEFLATE based streams.
Change-Id: I4acc9561eb56c9c368d1defab9c14e0454d105e1
This adds an adapted version of the adler32 algorithm from tinf/zlib
which will be necessary to support ZLIB deflate streams in the future.
Change-Id: Ie60e15acb288acf56a2d44e3d3e912e1b3eb2216
This relies on a macro, CRC32R_FAST, to select which version to
compile with. In tests the fast version is 2x faster at the expense
of requiring 960 more bytes for the lookup table. For now the default
is the space optimized version but in the future I would like to enable
this for ports where we can afford the extra storage and/or memory
requirements.
Change-Id: I25397dadedc3187bb02b2444f8b8ded77c2509b6
This relies on a macro, CRC32_FAST, to select which version to compile
with. In tests the fast version is 2x faster at the expense of requiring
960 more bytes for the lookup table. For now the default is the speed
optimized version but in the future I would like to enable this for ports
where we can afford the extra storage and/or memory requirements.
Change-Id: I8c7fde6b6ff130f0fdc7c8e472825e25bcdba022
This adds code sufficient to extract files to available storage given a
suitable root directory to extract to. It works on an already open zip
handle and also supports chain-loading a secondary callback in the event
that integration into the process is desired.
Change-Id: Id200d8f20d84a0cbd22906470de8bbd21d4525ef
This eliminates the dependence on a special struct since we were only
using the modtime anyway. But it no longer fits any known standard APIs
so I have converted it to our own extension instead. This can still be
adapted to existing hosted APIs if the need arises.
Change-Id: Ic8800698ddfd3a1a48b7cf921c0d0f865302d034
This emulates the traditional utime function from UNIX clones to allow
for manual updates of the modification timestamp on files and directories.
This should only prove useful for non-native targets as those usually
have a libc version of utime.
Change-Id: Iea8a1d328e78b92c400d3354ee80689c7cf53af8
This does the opposite of dostime_mktime, converting time_t back to
the two dos date time values. We use gmtime_r for native because that
is what is available and acts the same as localtime_r on other platforms
with a regular libc available.
Change-Id: If79469d0aae2d7c5dcdd905fbf04963669aa1138
This provides rudimentary support for parsing the contents of a ZIP
file. For now this just supports uncompressed file entries but DEFLATE
support is planned. This also only implements a low level public API
so more work will be needed to make it usable by application code.
Change-Id: Ia68b3078e5276666a0e5023f4bc7a9f94272738a
This moves the time conversion function to timefuncs since it has
uses on ports that don't use the FAT driver. This function has no
dependency on the FAT driver as it is so this should not cause any
issues. To reflect this separation the function was renamed to
dostime_mktime since it is really for DOS timestamps. The places
where it was used have also been updated.
Change-Id: Id98b1448d5c6fcda286846e1d2c736db682bfb52
This uses an equivalent algorithm but with a different initial value
than we normally use (all bits off vs all bits on). Use the new crc_32r
to replace the original MI4 crc32 implementation.
This frees up some extra space on mi4 targets which gives us more
room on a few very space constrained targets (sansa c200/e200, etc).
Change-Id: Iaaac3ae353b30566156b1404cbf31ca32926203d
This uses the reverse of the polynomial used by the current crc_32
function. The code for this was derived from the implementation used
by tinf. This version is space optimized and should be a good way to
reduce code duplication in other parts of rockbox that use the same
crc32 algorithm. This is mainly of use in areas where DEFLATE is in
use.
Change-Id: I918da5b4ea4dc441c0e7e6b5007abcc2da463bcb
Needed for g#3415, and if the comment is to be believed, this needed
updating for recent MIPS targets anyway.
Just blanket enable everything for all targets with >= 8 MiB of RAM.
The only targets with less than this are the Sansa Clip, c200v2, and
m200v4, which all have 2 MB of RAM.
The added code size is around 4 KiB to 7 KiB, depending on the target.
Change-Id: I5773482a13543dabb1f93f713a21f1382a9c5a22
Before this was just implemented inline wherever it was needed. Now
it is provided as 2 inline functions in a header called checksum.h.
There should be no differences in actual behavior.
Change-Id: I5d756cc01dc6225f5cc8b6af90911a3fc7b57cd5
REMOVED FROM ALL NATIVE BOOTLOADERS:
finish removing the text scrolling
pare down printf to a minimal subset (%c %s %l %d %u and %x(%p))
remove diacritic and rtl language support
GOAL 134000
START 135305
CURRENT 133700
SUCCESS! (ASSUMING IT WORKS -- UNESTED)
Change-Id: Ic3f6ac1dc260578f581ee53458b3e5bb47d313ec
Firmware now includes rudimentary redirect functionality
but this only supports /.rockbox in the root of the device
This patch allows loading external drive and directory into root namespace
Root Redirects can now be put into different folders
For instance placing '/_test' into SD1/rockbox_main.<playername>
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
Redirect will be updated if code refactor is ever done
Requires Multiboot bootloader (already in main)
Change-Id: I697b3d0499f85e789c3020bc2133fbe0023f72a2
Provide definitions for the macros:
* RB_ROOT_VOL_HIDDEN(v) to exclude certain items from the root.
* RB_ROOT_CONTENTS to return a string with the name of the
directory to mount in the root.
Defaults are in export/rbpaths.h
It's a bit much for those that don't need the full functionality.
Some conditional define can cut it back a lot to cut out things only
needed if alternate root mounts are required. I'm just not bothering
yet. The basic concept would be applied to all targets to keep file
code from forking too much.
Change-Id: I90b5c0a1c949283d3102c16734b0b6ac73901a30
I never added multiboot awareness to ROLO
When a new firmware file was loaded [Bootdata] would not be
copied to the new instance resulting in the firmware
running off the internal drive till next reboot
Bootloaders shares the rb-loader code but should not be
affected by the removal of static from write_bootdata()
Change-Id: Iccb18eebeee5c59f9534df51eb6826876c441762
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
This allows for a superfloppy that has MBR-like data in the BPB.
this solves FS#12294 while allowing arbitrary partition types.
Change-Id: I53880fe7dd53e5015f5f15be0ddba11105fcd778
If we aren't going to check for the partition type, we don't need the array of
known FAT partition types.
Original Author: Torne Wuff <torne@wolfpuppy.org.uk>
Change-Id: I558d4287189408c513dfbca49e13906cdb7918b1
Instead of only mounting partitions with a FAT partition type, try any
partition that isn't type 0 (unallocated) or 5 (extended). This makes it easier
to reformat SDXC cards which have the exFAT partition type, and also brings us
in line with pretty much every other OS at this point. Anything with a
valid-looking FAT superblock will get mounted.
original author: Torne Wuff <torne@wolfpuppy.org.uk>
Change-Id: I3ea8d437a79f9da270f9d119cc670e472331a9da
Stop gap till I get a chance to work on the root folder stuff
Makes whatever volume marked by bootdata.boot_volume
the base or root volume, mounts all other volumes after
the specified boot volume.
Has the effect of swapping the SD card to the slot for internal
and Internal storage is mounted as the Sd-card.
Does not honor root redirect -- uses .rockbox folder in the root of boot volume
Change-Id: I0f786aa0c8721e21cba607366775be3e3c0cf474
The Quake plugin is the only code that actually relies on float
formatting. Because Quake only runs on targets with huge memory
anyway, limiting their formatting to just those targets will minimize
the increased memory use in the core.
Change-Id: Icdbe26ec6ede564861cc01ac4add76a12b00ecd5
Wanted to see how gnarly it is to do.
Big number handling could be done with better algorithms
since it can get a bit slow with large integers or tiny
fractions with many lead zeros when only a few digits are
needed.
Anyway, it supports %e, %E, %f, %F, %g and %G. No %a or long
double support seems warranted at the moment.
Assumes IEEE 754 double format but it's laid out to be able to
replace a function to handle others if needed.
Tested in a driver program that has a duplicate vuprintf and
the content was pasted in once it looked sound enough to put
up a patch.
Change-Id: I6dae8624d3208e644c88e36e6a17d8fc9144f988
when precision is not specified memchr recieved -1 for count
count is unsigned so it looks in a potentially very large area
for a terminator and returns this whole area if \0 is not found
Instead we should use memchr when precision is specified
and if precision is not specified use strlen
Fixes 60+Mb Config.cfg files
Change-Id: Ic4d1439334588f999c9071235430c42df2af5cc4
is_diacritic is used for pretty much all of the text display sizing
Timing here matters, so important it uses a
priority buffer in order to cut down on searching the database.
This patch is verified functionally equlivalent but
saves 80 bytes and is ~20% faster for the clip+ I tested it on
Several things were done:
Optimizing the copy loop for the priority buffer
Globbing some operations together
but the main one has to do with the database structure its self
--
Rather than a bit packed struct it combines the lower 8 bytes into
one value [info] and uses flags to access the values instead
Change-Id: I475073419b647639ef1eeaa3b9213e4e1067c0db