• Status Unconfirmed
  • Percent Complete
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by asettico - 2011-05-22

FS#12125 - Use persistent dircache without HAVE_EEPROM_SETTINGS

The patch allows to use the persistent dircache even in targets that do not define HAVE_EEPROM_SETTINGS.

Starting trying to implement such a feature for my iPod Video, I "discovered" the functions dircache_load/save (I have a slight knowledge of the RB software). Investigating why it was not used on my target, I saw that it's conditioned to the define HAVE_EEPROM_SETTINGS without an apparently reason to limit them just to some targets.
So, I simply "detach" the functions definition and use from the define.
I'm using it since an hour, starting up and shutting down the DAP various times, jumping back and forth inside the dynamic play list, and I got no problems at all.

If I guess correctly the code, the dircache should be updated also when changing the DAP content, if the USB connection is done by RB and not the OF.

It's applied to r29907.

I also fixed a typo (missmatch → mismatch).

nls commented on 2011-05-23 06:37

The problem is dualboot, rockbox has no idea if you changed the contents of the disk in the OF since the last time you booted rockbox so this is only safe on players that don't have dualboot or any usb msc mode besides the one provided by rockbox.

To allow rebuild persistent dircache also using the OF, I tried to build a very simply tool, basing from the idea of tools/database.
So I generated tools/dircache with the only purpose, for now, to scan the current directory and build the dircache just like the FW does.
The tool compiles, but, due to my very poor knowledge of the software architecture, it segfaults.
Anyway, I put here the patch, so if someone want to give some hint or continue the development, he/she has some base.

Unfortunately, I haven't sufficient spare time to study the FW, so my development will advance extremely slowly, but I think the advantages got by the feature are enough to involve someone with more knowledge! :-)

Ops, I'm going to add the missing sources…

Here it is the complete patch… sorry.

If the problem is dualboot, then that #define should be changed in rockbox . HAVE_EEPROM_SETTINGS isn't obviously semantically equivalent to "has no dualboot capability".

Having said that, how hard would it be to make dualboot 'not a problem'. E.g. by persisting some sentinel information across rockbox boots, that the dualboot/OF is known to remove. (for example, ipod (at least ipod 5g) is known to persist iram contents across boots, could we encode "rockbox has shutdown" somewhere in there, and if on rockbox reload that information is still there we assume dircache is still valid?)
(noting  FS#11149  , naturally)


Available keyboard shortcuts


Task Details

Task Editing