Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Cowon D2
« previous next »
  • Print
Pages: 1 ... 62 63 [64] 65

Author Topic: Cowon D2  (Read 644647 times)

Offline cereal_killer

  • Member
  • *
  • Posts: 420
Re: Cowon D2
« Reply #945 on: April 28, 2015, 02:24:20 PM »
Hey niggle,

there are already reports of that problem. See:
Quote from: cereal_killer on April 28, 2015, 09:19:06 AM
Hello wilkes5,

I also get the panic message on my D2+, but it seems, that the latest builds are buggy. I have no problems with 3.13.

The mesage is: *PANIC*
dc_writeback_callback () - Could not write to sector 81 93 (error -1)
pc: 2005C064 sp:200B3228
bt end

I have talked about that to pamaury on IRC and he kindly tried to help and even provided a test build, but no luck.

Maybe someone can have a look at this problem too?

Greetings,
c_k

I hope this bug gets fixed soon.
Logged

Offline niggle

  • Member
  • *
  • Posts: 6
Re: Cowon D2
« Reply #946 on: April 28, 2015, 03:21:13 PM »
Thank you cereal_killer!

We'll wait...

Logged

Offline andiator

  • Member
  • *
  • Posts: 44
Re: Cowon D2
« Reply #947 on: April 23, 2016, 06:28:41 PM »
Well, it's been a while since my last visit here :)

Last days I compiled and installed the latest version, with the known panic error.
After some playing around it seems to be a problem with writing or creating files. The first one is "nvram.bin".
(I added only view logf outputs)

Code: [Select]
fat_create_file("nvram.bin",200F01E4,200F0234)
cache_commit()
dc_commit_all()
dc_write_callback() ---> *PANIC*
After that  "nvram.bin" has been created with zero size.

The next start:
Code: [Select]
dc_cach_probe()
dc_write_callback() ---> *PANIC*

If I copy this file from the old installation, the D2 doesn't crash at start, but trying to change a setting, play a music file or at power off it crashes.
Then an empty "config.file" is created, but the settings are not saved.

Copying ".playlist_control" and "config.cfg" seems to be a workaround for this crash. The changed settings and the playing position are NOT lost, so the writing does work. But it still crashes at the power off.

I hope this info can help to find the problem, I can only provide more logf information and test the changes, since I have no idea how the file system works.

P.S.
In the storage.c in the function storage_write_sectors() this piece of code is called:
Code: [Select]
#if (CONFIG_STORAGE & STORAGE_NAND)
    case STORAGE_NAND:
        return nand_write_sectors(IF_MD(ldrive,)start,count,buf);
#endif

NAND? I thought it is RO (read only) on D2 because we not really understand the anti wearing algorithm. Is that the cause for the *PANIC*?

Greetings,
Andiator
« Last Edit: April 24, 2016, 12:55:34 PM by andiator »
Logged
D2 8Gb + 128Gb µSD

Offline A11A

  • Member
  • *
  • Posts: 24
Re: Cowon D2
« Reply #948 on: December 20, 2019, 05:56:35 AM »
Is anyone still interested in the D2? I'm considering fixing, or at least creating workarounds for, what handful of major issues are currently present.

As a workaround to crashing on newer builds: if you wipe the partition table of internal storage so that only your SD card is available to Rockbox, it will stop it from crashing, however, if you boot back up into stock firmware it will format internal storage and cause Rockbox to crash again. Formatting internal storage as something Rockbox doesn't support will likely also work, but its also still likely that booting stock firmware will still cause it to be reformatted back to FAT32.
Logged

Offline cereal_killer

  • Member
  • *
  • Posts: 420
Re: Cowon D2
« Reply #949 on: December 20, 2019, 11:26:42 AM »
Hello A11A,

great, that you are also interested in fixing the D2 builds. I think, that if Rockbox on the D2 would completely run on SD card (by disabling the internal storage in Rockbox), the problems of Rockbox not being able to write to flash would be gone. You could then still use the OF. Check this thread for mor information:

http://forums.rockbox.org/index.php/topic,51522.0.html

Greetings
c_k
Logged

Offline A11A

  • Member
  • *
  • Posts: 24
Re: Cowon D2
« Reply #950 on: December 20, 2019, 02:47:53 PM »
I was thinking of doing that exact thing saratoga suggested, it shouldn't take much to do so, you just need to get Rockbox to mount the sdcard first and treat it as if it's internal storage.

In regards to writing to NAND, a driver without wear leveling could be implemented with writing disabled by default and a warning about potentially damaging your NAND if you decide to enable it. In regards to wear leveling, would this Linux kernel released by telechips be of any use? https://github.com/cnxsoft/telechips-linux

Now if only I can get a toolchain to compile, having issues due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90677 and I'm getting a weird segfault on gcc 8.3.0. Going to try using 4.9.3 next.
Logged

Offline Milardo

  • Member
  • *
  • Posts: 76
Re: Cowon D2
« Reply #951 on: December 20, 2019, 02:52:04 PM »
Quote from: A11A on December 20, 2019, 02:47:53 PM
I was thinking of doing that exact thing saratoga suggested, it shouldn't take much to do so, you just need to get Rockbox to mount the sdcard first and treat it as if it's internal storage.

In regards to writing to NAND, a driver without wear leveling could be implemented with writing disabled by default and a warning about potentially damaging your NAND if you decide to enable it. In regards to wear leveling, would this Linux kernel released by telechips be of any use? https://github.com/cnxsoft/telechips-linux

Now if only I can get a toolchain to compile, having issues due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90677 and I'm getting a weird segfault on gcc 8.3.0. Going to try using 4.9.3 next.

Hi, l'd like to ask, is the cowon m2 similar to the cowon d2? I read somewhere on this forum that it maybe possible to convert the d2 port to m2?
Logged

Offline A11A

  • Member
  • *
  • Posts: 24
Re: Cowon D2
« Reply #952 on: December 20, 2019, 03:29:28 PM »
Quote from: Milardo on December 20, 2019, 02:52:04 PM
Hi, l'd like to ask, is the cowon m2 similar to the cowon d2? I read somewhere on this forum that it maybe possible to convert the d2 port to m2?
This isn't really where you should be asking, but if you want to help get an M2 port going you should probably collect info about the M2 into a wiki page similar to https://www.rockbox.org/wiki/CowonD2Info from threads like http://forums.rockbox.org/index.php?topic=50936.0 and then start a thread like this one for that device.
Logged

Offline A11A

  • Member
  • *
  • Posts: 24
Re: Cowon D2
« Reply #953 on: December 20, 2019, 07:27:24 PM »
If anyone wants to run Rockbox off an SD card only to stop crashes, here's a quick patch to disable mounting NAND
Code: [Select]
diff --git a/firmware/export/config/cowond2.h b/firmware/export/config/cowond2.h
index d4623381fc..1d94e9a93a 100644
--- a/firmware/export/config/cowond2.h
+++ b/firmware/export/config/cowond2.h
@@ -58,10 +58,11 @@
 /* define this if you have a flash memory storage */
 #define HAVE_FLASH_STORAGE
 
-#define CONFIG_STORAGE (STORAGE_NAND | STORAGE_SD)
+//#define CONFIG_STORAGE (STORAGE_NAND | STORAGE_SD)
+#define CONFIG_STORAGE (STORAGE_SD)
 #define HAVE_MULTIDRIVE
 #define HAVE_HOTSWAP
-#define NUM_DRIVES 2
+#define NUM_DRIVES 1
 
 #define CONFIG_NAND NAND_TCC

EDIT: I just found out that this exact same patch came up 2 years ago in a different D2 thread
« Last Edit: December 20, 2019, 07:56:48 PM by A11A »
Logged

Offline cereal_killer

  • Member
  • *
  • Posts: 420
Re: Cowon D2
« Reply #954 on: December 21, 2019, 07:32:07 AM »
Quote from: A11A on December 20, 2019, 07:27:24 PM
If anyone wants to run Rockbox off an SD card only to stop crashes, here's a quick patch to disable mounting NAND

Thank you A11A. I have been recently thinking of playing with my D2. As I have more files than the OF will accept and I'd like to use the OF too sometimes, I'll partition the SD card to hide most of the files from the OF. Will this patch work with this setup?
Logged

Offline burkjavier

  • Member
  • *
  • Posts: 90
Re: Cowon D2
« Reply #955 on: December 21, 2019, 11:55:29 AM »
I'd certainly test any new builds out.  My D2 doesn't get a heck of a lot of use these days, but it's running the last build I had created (last year I guess).   Probably about due for a refresh.

Logged
Current RB'd devices: Gigabeat F / X, Cowon D2+

Offline niggle

  • Member
  • *
  • Posts: 6
Re: Cowon D2
« Reply #956 on: December 21, 2019, 05:46:26 PM »
I'm interested, and I can test too.
Long live the D2!
Logged

Offline A11A

  • Member
  • *
  • Posts: 24
Re: Cowon D2
« Reply #957 on: December 21, 2019, 07:27:49 PM »
Here's a build, latest dev version as of this post, with internal storage disabled.
Usual disclaimer applies, I'm not responsible if your player explodes, burns your house down, starts WW3, etc.
https://ipfs.io/ipfs/QmZX79WhrjMYXY9z4NV8wqoN5oN9jrvW9emm7igvJXXUbk

EDIT: Here's a second extremely experimental build with NAND access enabled and a workaround for crashing: https://ipfs.io/ipfs/QmRBJEiwF7KsdX5Dy1eezufH64jpvDeMFd5zgcjcSsN5pZ

edit again: forgot to include the experimental patch
Code: [Select]
diff --git a/firmware/target/arm/ata-nand-telechips.c b/firmware/target/arm/ata-nand-telechips.c
index 73d92a5215..71cc7c5f81 100644
--- a/firmware/target/arm/ata-nand-telechips.c
+++ b/firmware/target/arm/ata-nand-telechips.c
@@ -867,7 +867,8 @@ int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count,
     (void)start;
     (void)count;
     (void)outbuf;
-    return -1;
+    //return -1;
+    return 0;
 }
 
 #ifdef HAVE_STORAGE_FLUSH
« Last Edit: December 21, 2019, 09:43:08 PM by A11A »
Logged

Offline niggle

  • Member
  • *
  • Posts: 6
Re: Cowon D2
« Reply #958 on: December 22, 2019, 01:41:47 PM »
no more *PANIC* with any of these builds!
Logged

Offline A11A

  • Member
  • *
  • Posts: 24
Re: Cowon D2
« Reply #959 on: December 23, 2019, 02:37:45 AM »
Well, I tried turning on USB support and quickly figured out why it's not on by default. It's too slow to be usable and usually hardlocks your entire player.

Other than those write-related panics, USB being entirely non-functional, are there any other major issues specific to D2 builds? I've noticed some minor annoyances like battery being inaccurate.

A quick explanation of that NAND workaround: what that build with NAND enabled does is essentially pretend it's written data to NAND even though it hasn't, rather than returning a failure when it tries, so it appears as if you can make changes even though you can't and they're not saved.

Also, a sidenote regarding builds/links I post that are on IPFS, IPFS works somewhat like bittorrent and I'd recommend installing ipfs-desktop along with ipfs-companion then re-downloading them once those are set up so that you keep a local cache of those builds on your machine that gets served to others, otherwise they could disappear if my node is offline and nobody has downloaded them from a gateway in a while. There's also a way to keep things locally stored permanently but explaining how to do so is out of the scope of a forum post here.
Logged

  • Print
Pages: 1 ... 62 63 [64] 65
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Cowon D2
 

  • SMF 2.0.18 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.03 seconds with 16 queries.