Rockbox Development > New Ports
Cowon D2
GodEater:
This doesn't sound like a bug that is specific to the D2, more a general Rockbox one. There have been reports of duplicates being created in the database for a long time, but no-one has figured out what triggers it yet.
I can't personally think of anything specific to the D2 which would cause that at all - so you're likely posting this in the wrong place.
Do a search of the forums for other threads about duplicates in the database, and see if you can't contribute some more info there.
grantmasterflash:
--- Quote from: GodEater on September 28, 2009, 03:29:21 AM ---This doesn't sound like a bug that is specific to the D2, more a general Rockbox one. There have been reports of duplicates being created in the database for a long time, but no-one has figured out what triggers it yet.
I can't personally think of anything specific to the D2 which would cause that at all - so you're likely posting this in the wrong place.
Do a search of the forums for other threads about duplicates in the database, and see if you can't contribute some more info there.
--- End quote ---
OK. I thought it might be significant that the only files that are duplicated are ones that reside on the SD card and that files on the D2 internal memory are not duplicated. Since the SD functionality is a bit unique on the D2 at the moment and my searches didn't turn up any hits where anyone described partial duplicates, I figured I would start here.
Update:
First I noticed that enabling Directory Cache was not being retained after reboots of Rockbox. Every time I set it to yes, then rebooted, it would be set back to no.
Next I used rbdb.py (from http://www.rockbox.org/wiki/TagcacheDBFormat) to parse my database files, and found that database_4.tcd contained incorrect repeating filenames for every file on my SDHC card.
For example:
/The Beatles in Mono/With The Beatles/The Beatles in Mono/With The Beatles/The Beatles in Mono/With The Beatles/The Beatles in Mono/With The Beatles/Birthday Party, The/Hits/12_Dead Joe.mp3
/The Beatles in Mono/With The Beatles/The Beatles in Mono/With The Beatles/The Beatles in Mono/With The Beatles/Birthday Party, The/Hits/12_Dead Joe.mp3
/The Beatles in Mono/With The Beatles/The Beatles in Mono/With The Beatles/Birthday Party, The/Hits/12_Dead Joe.mp3
/The Beatles in Mono/With The Beatles/Birthday Party, The/Hits/12_Dead Joe.mp3
/Birthday Party, The/Hits/12_Dead Joe.mp3
That last one is the only one that is correct. So every file on the SDHC card had one correct filename entry and then 4 incorrect entries under some repetition of /The Beatles in Mono/With The Beatles/. I checked the /The Beatles in Mono/With The Beatles/ and found that it was empty, had a 0 byte filesize, and had a modified date that was several weeks after all the other directories within /The Beatles in Mono (I put all the albums from that boxset on the card at the same time, so they should all have the same modified date).
I removed /The Beatles in Mono/With The Beatles/ from the card, re-initialized the db in Rockbox, and, of course, no dupes.
I also noticed after this that the Directory Cache setting is being retained from boot to boot.
I can only conclude that some unknown corruption to that /The Beatles in Mono/With The Beatles/ directory occurred at some point after I put those files on the card, because I had previously listened to those files without a problem (and as I said earlier, the dupe problem only started occurring again a few days back - which was a few weeks after those files were already in place). I'm not blaming Rockbox, but it's something I'll keep an eye on since this is the second time the dupe problem has occurred for me. The next time it happens, I will be much more diligent about noting exactly what changes I made right beforehand, what OS I used to unmount/eject the card (Windows or Linux, I use both), etc. I know without a doubt though that I made no changes whatsoever to that problematic directory when the dupes began to occur.
The main thing that can be concluded at this point is that using rbdb.py is a very good way to figure out what files/directories are causing duplicated entry problems. It also seems that the Directory Cache setting may be a clue as to what's going on.
shotofadds:
I need a volunteer... somebody who has a D2+ that currently does not work with Rockbox (ie. one with the updated power management chip - PCF50635).
Could you unzip this Rockbox build to the root of your D2 (or SD card), then upload this image using tcctool? Then tell me:
a) if Rockbox boots
b) if the backlight works
c) if you can adjust the brightness in the General > Display > LCD settings menu
d) if battery voltage monitoring works (in the System > Debug menu)
e) if sound works
@grantmasterflash, I didn't see your update until now - glad you got your problem sorted in the end (and for pointing out how these kind of issues can be diagnosed). I wonder what caused that corruption....?
GMelchett:
I'm not 100% sure that I got an D2+ with PCF50635. I bought the 16 GB variant a few days ago and it came with firmware 2.11 installed and my own built rockbox.bin (3.4.7) didn't work when loading it via tcctool.
However, all tests with provided binaries were executed successfully, except sound. It is very quiet.
@shotofadds, I'm willing to do futher testing. I though about trying to do the needed changes to rockbox to get PCF50635 supported myself. I write Linux drivers on the same ARM architecture as the D2 got for a living.
Another question, I've been looking at Toni's cowond2 emulator, just got it to compile under linux.
However, I'm confused regarding the input data. A few files are required, "d2.bin" which I assume is
the original firmware, then there are two other files "eeprom.bin", and "wrdata.bin" (or rather "test11.bin" that is currently in use.). I can't figure out how to get them. I know what an eeprom is, but
how do I get it out from the player? Also, Toni mention that a complete flash memory dump is
required. Where is that used in the emulator? wrdata.bin? How do you dump the complete flash,
I assume including the flash oob. (Simple "dd if=/dev/<player device>" does the job?)
Maybe the emulator can be useful for find out how flash wear-n-tear is handled.
shotofadds:
--- Quote from: GMelchett on October 09, 2009, 02:45:25 PM ---I'm not 100% sure that I got an D2+ with PCF50635. I bought the 16 GB variant a few days ago and it came with firmware 2.11 installed and my own built rockbox.bin (3.4.7) didn't work when loading it via tcctool.
However, all tests with provided binaries were executed successfully, except sound. It is very quiet.
--- End quote ---
That sounds very much like you have the hardware I'm talking about - thanks for testing it out. If that is the case, you will also find the touchscreen won't work because I haven't written the driver for it yet (although it's in progress). If the touchscreen works, you have the older hardware revision.
I'm a bit confused by the quiet sound - I'm not sure what would cause that. Can I ask you a really stupid question, just to check the obvious things like the volume settings and whether you have replaygain enabled? Also, does the FM radio work (is that quiet too)?
--- Quote ---@shotofadds, I'm willing to do futher testing. I though about trying to do the needed changes to rockbox to get PCF50635 supported myself.
--- End quote ---
I've done a fair amount of work on it already to build the above test images, so I'll get those changes into SVN so you and/or others can test things out some more and try tweaking things yourself... help is always welcome!
--- Quote ---I write Linux drivers on the same ARM architecture as the D2 got for a living.
--- End quote ---
Excellent, we need more people with low-level experience to get interested in this port! What sort of devices are you working with?
--- Quote ---Another question, I've been looking at Toni's cowond2 emulator, just got it to compile under linux.
However, I'm confused regarding the input data. A few files are required, "d2.bin" which I assume is
the original firmware, then there are two other files "eeprom.bin", and "wrdata.bin" (or rather "test11.bin" that is currently in use.). I can't figure out how to get them. I know what an eeprom is, but
how do I get it out from the player?
--- End quote ---
I haven't had the chance to get the emulator working yet myself,
The EEPROM is mapped to an 8KB section of memory at 0xE0000000. You'll need to write some code to dump this from the player - either to SD card or via USB. Maybe ask Toni if he already has the code to do it? Or you/I could write a plugin to do the job.
Similarly the raw NAND flash needs to be dumped either to SD card (if you have a large enough card!) or over USB. Again some custom code will be needed to do this (dd isn't enough as that won't get you the raw NAND blocks / oob).
I haven't looked at the code, but I assume wrdata.bin is a file that gets written to disk by the emulator (containing NAND writes)?
What I might do is write a plugin that can dump all this stuff to SD card, and then get someone with a 2GB D2 to run it for us. That should make things a bit easier to handle...!
EDIT: The above changes for PCF50635 support are now in SVN. Lots more work to do though! :-\
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version