Rockbox Technical Forums

Installation / Removal => Manual Installation => Other - Installation/Removal => Topic started by: SelectOkay on May 16, 2022, 05:21:35 PM

Title: Surfans F20 "NAND open error"
Post by: SelectOkay on May 16, 2022, 05:21:35 PM
I'm new to the forums and Rockbox, but I've installed it on a Sandisk Clip Zip without much issue. The problem is  I bought a Surfans F20 and I can't install Rockbox on it.
I've tried using the Rockbox Utility but after using the firmware from the company itself, the utility constantly crashes.
SO I tried to use the native port and got farther, but now it's telling me "NAND open error (5)" I tried using two different mircoSD cards and even changing the partition from GPT to MBR but it's not working. Does anyone have any advice or help? I'm kinda stumped here.
Title: Re: Surfans F20 "NAND open error"
Post by: SelectOkay on May 16, 2022, 08:41:47 PM
Update: I manually installed the bootloader and that fixed all my problems. I guess I'm newer to all this than I thought. Whoops!
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on May 17, 2022, 07:08:52 AM
I'm not sure if the native port has been tested on the Surfans F20. The NAND open error is a bit odd. Usually this would mean your flash chip is not supported, but since it worked eventually... meh. It's good you got it working, though!
Title: Re: Surfans F20 "NAND open error"
Post by: dconrad on May 17, 2022, 11:02:24 AM
Nevermind, ignore
Title: Re: Surfans F20 "NAND open error"
Post by: kaas on May 29, 2022, 11:48:13 AM
Update: I manually installed the bootloader and that fixed all my problems. I guess I'm newer to all this than I thought. Whoops!
Did you manage to install the native port, or are you running the hosted port now? If you installed the native port, I'd love to hear how you did it, as I'm having the exact same issue.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on May 29, 2022, 12:57:15 PM
kaas - The F20 may have a different flash chip that isn't recognized. I'm happy to assist, but we need to figure out is what flash chip is used. If you are willing and able to take apart the player, that's the fastest way to find out. The other option is probing the flash in software, but that'll require a modified bootloader.
Title: Re: Surfans F20 "NAND open error"
Post by: kaas on May 29, 2022, 01:49:29 PM
kaas - The F20 may have a different flash chip that isn't recognized. I'm happy to assist, but we need to figure out is what flash chip is used. If you are willing and able to take apart the player, that's the fastest way to find out. The other option is probing the flash in software, but that'll require a modified bootloader.
Thanks very much, I would prefer to go the software route as I'm not very comfortable taking it apart (don't even see any screws so it would probably involve at least some amount of breakage..). I assume in that case you can send me the required bootloader, and I'll run it with jztool?

Edit: I've since resolved my issue with the hosted port (see this bug (https://www.rockbox.org/tracker/task/13353)), which was why I wanted to try the native port in the first place. So from my end, there's no particular hurry to get the native port working on my specific player. I'd still be glad to assist, though.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on May 31, 2022, 01:30:07 PM
kaas - The F20 may have a different flash chip that isn't recognized. I'm happy to assist, but we need to figure out is what flash chip is used. If you are willing and able to take apart the player, that's the fastest way to find out. The other option is probing the flash in software, but that'll require a modified bootloader.
Thanks very much, I would prefer to go the software route as I'm not very comfortable taking it apart (don't even see any screws so it would probably involve at least some amount of breakage..). I assume in that case you can send me the required bootloader, and I'll run it with jztool?

Edit: I've since resolved my issue with the hosted port (see this bug (https://www.rockbox.org/tracker/task/13353)), which was why I wanted to try the native port in the first place. So from my end, there's no particular hurry to get the native port working on my specific player. I'd still be glad to assist, though.

Okay, I added a flash info command to the bootloader, download link here: https://drive.google.com/file/d/1BgvDvGBKBSnWTDBHfE_uii3fjpSARqxt/view
(which is patch g#4566 (https://gerrit.rockbox.org/r/c/rockbox/+/4566))

If you load that with jztool and select Debug tools > Flash info from the menu, it will dump some info to a file called flash_info.txt on the SD card. Copy & paste the file contents here. It'll show the ID bytes and some additional info - whether the chip is NAND or NOR and the page and block sizes. The probing method is basically the same as what the CPU does on boot to identify the flash, and it's read-only, so it should be safe. I also tested it on my players as a sanity check and it's working as expected.
Title: Re: Surfans F20 "NAND open error"
Post by: kaas on June 07, 2022, 07:15:29 AM
Here you go :)

Quote
readID opcode  = FF EF AA 21
readID address = EF AA 21 00
readID dummy   = EF AA 21 00
sfc params0  = 06 05 04 03
sfc params1  = 02 55 AA 55
sfc params2  = 00 63 02 02
sfc params3  = A4 2F 00 00
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on June 08, 2022, 06:10:45 AM
Thanks, it appears to be a Winbond W25N01GV (https://datasheet.lcsc.com/lcsc/1809200036_Winbond-Elec-W25N01GVZEIG_C88868.pdf) based on the ID bytes.

Here's an updated bootloader which supports that chip: https://drive.google.com/file/d/1zj8gq1G8DK-9581uVWq-9FmKXLlPuw5w/view?usp=sharing

This one has a "Flash ONFI info" option which you can run, paste the flash_onfi_info.txt file here. If the info matches up with the datasheet (8.2.27 Parameter Page Data Definitions) then we can be pretty confident the chip is correct. If you also take a normal bootloader backup and upload it somewhere, I can check that out to make sure it looks sane.
Title: Re: Surfans F20 "NAND open error"
Post by: kaas on June 13, 2022, 03:46:57 AM
Quote from: flash_onfi_info.txt
signature = 2222AAAA
revision = AAAA
manufacturer = "ÿÿÿÿÿÿÿÿÿÿÿÿ"
device model = "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"
JEDEC mf. id = FF
data bytes per page = 4294967295
spare bytes per page = 65535
pages per block = 4294967295
blocks per lun = 4294967295
number of luns = 255
bits per cell = 255
max bad blocks = 65535
block endurance = 65535
programs per page = 255
page program time = 65535
block erase time = 65535
page read time = 65535
And here (https://drive.google.com/file/d/13WP-95MVuDDSRIp92lKA9Sy2v_oXukZz/view?usp=sharing) is the bootloader backup. Although using the bootloader went fine I did not go ahead flashing it, since the datasheet values don't seem to match up (e.g. spare bytes per page is 4x higher in the txt than in the datasheet), I may be misinterpreting it however.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on June 13, 2022, 06:54:28 AM
It's not reading data off the chip properly, the data is mostly 0xff, so yeah flashing it would be a really bad idea. Not sure what's wrong. I'll try reducing the clock speed & disable quad I/O, and double check for any mistakes I might've made.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on June 20, 2022, 04:16:21 PM
Here's another build, try dumping the ONFI info and take a bootloader backup again. I wouldn't advise flashing it.
https://drive.google.com/file/d/1IJjG_zZxdSxNZK3XM-nAeaJzVnR2oHcK/view?usp=sharing
Title: Re: Surfans F20 "NAND open error"
Post by: kaas on June 22, 2022, 06:19:40 AM
Quote from: flash_onfi_info.txt
probed chip ID = EF AA 21
signature = FFFFFFFF
revision = FFFF
manufacturer = "ÿÿÿÿÿÿÿÿÿÿÿÿ"
device model = "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"
JEDEC mf. id = FF
data bytes per page = 4294967295
spare bytes per page = 65535
pages per block = 4294967295
blocks per lun = 4294967295
number of luns = 255
bits per cell = 255
max bad blocks = 65535
block endurance = 65535
programs per page = 255
page program time = 65535
block erase time = 65535
page read time = 65535
Bootloader backup. (https://drive.google.com/file/d/1eyJ7T-9eUjFSse5ZQ-5mdAIVKwmSyBB0/view?usp=sharing) Thanks again for your continued efforts.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on June 23, 2022, 12:16:02 PM
That last dump was almost good but shifted by one byte. This build should fix it.
https://drive.google.com/file/d/1LQtakDKCNTGvXU-u9QVYc056nN78CkDl/view?usp=sharing

Try another bootloader backup. No need to bother with the ONFI info this time.

Also, could you unzip a daily build to your SD and run rockbox directly from the bootloader? You don't need to install the bootloader, just select the Rockbox boot option while you're in the bootloader. EDIT: I forgot to mention, this is so you can check if rockbox actually works. If they changed the flash there's no guarantee the rest of the hardware is the same as older units.
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on June 26, 2022, 06:57:04 AM
Dear amachronic and kaas,

I hope I am not interrupting your exchange, but if it helps, here is a backup of the native bootloader taken after loading amachronic's bootloader v4 with jztool (https://drive.google.com/file/d/1xvTcsPqMgWUUic_VzPFrYSAAqe117ugT/view?usp=sharing (https://drive.google.com/file/d/1xvTcsPqMgWUUic_VzPFrYSAAqe117ugT/view?usp=sharing)). Albeit not requested at this point, I also made a zip archive of (all) the available debug dumps (https://drive.google.com/file/d/17irOvVhWSZW18bn6DYpiDMTG0yMFHyEo/view?usp=sharing (https://drive.google.com/file/d/17irOvVhWSZW18bn6DYpiDMTG0yMFHyEo/view?usp=sharing)).

As for running Rockbox from the bootloader menu; I extracted the zip of the native Rockbox (should it have been a daily hosted build?) onto the SD card and started it from the bootloader menu. It runs and plays a FLAC file with no noticeable problems. The only thing I saw was the message: "error accessing playlist control file" as I unplugged the USB connection to the computer.

Notably, while some tiny pops can be heard when plugging into the Line Out, no sound comes out of it during playback.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on June 26, 2022, 12:04:21 PM
...
Thanks, you did everything right. Aside from line out not working, it sounds like Rockbox runs fine. But isn't that the same as the hosted build?

The ONFI info is okay and matches up with the Winbond datasheet. The raw values are correct but I got the endianness wrong in the dumper, so the text dump appears wrong. It seems there's still something wrong with the flash read, some pages are being read as 0xff intermittently and some are getting zeros prepended to them. So we're not quite there yet, but getting closer.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on June 26, 2022, 02:25:41 PM
Turns out I didn't put the chip into buffered read mode. That's fixed, also fixed the ONFI dumper. Maybe this build will actually work? Either a full flash dump or bootloader backup should be enough to confirm.

https://drive.google.com/file/d/1a5GbTZWmyxsgglfdRjHJ4EfXoyEZBCZD/view?usp=sharing
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on June 27, 2022, 06:08:13 AM
Hi,

Interesting! It seems that this time the readable text (e.g. "Winbond") in the ONFI dump is gone again. Debug files and bootloader backup at https://drive.google.com/file/d/11mzSyUDyyRi6DGnfWFrtbZQOpWC43cwo/view?usp=sharing (https://drive.google.com/file/d/11mzSyUDyyRi6DGnfWFrtbZQOpWC43cwo/view?usp=sharing).

Rockbox runs and plays fine apparently. No USB-related error message this time. No sound in Line Out.

My sincerest thanks for your continued efforts, amachronic!
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on June 28, 2022, 06:13:53 PM
But isn't that the same as the hosted build?

Btw, sorry I forgot to answer this; yes, it is the same functionality as observed with the hosted build :-)
Title: Re: Surfans F20 "NAND open error"
Post by: kaas on July 04, 2022, 01:10:20 PM
Turns out I didn't put the chip into buffered read mode. That's fixed, also fixed the ONFI dumper. Maybe this build will actually work? Either a full flash dump or bootloader backup should be enough to confirm.

https://drive.google.com/file/d/1a5GbTZWmyxsgglfdRjHJ4EfXoyEZBCZD/view?usp=sharing
Hi, would it still help if I do this as well (or the one you posted previously), or is twotoneblue's backup enough for now?
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 06, 2022, 06:38:30 AM
You're welcome to try another backup, but unfortunately twotoneblue's backup is showing the same issue as before and it's safe to assume yours would too. I haven't had time to investigate further.

In case anyone is interested the bootloader sources are on Gerrit (https://gerrit.rockbox.org/r/c/rockbox/+/4577), and Linux (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mtd/nand/spi/winbond.c) also supports this flash, so maybe that's useful as a reference.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 09, 2022, 06:23:41 AM
Looks like I left all the timing parameters at the minimum defaults, so I think commands were being sent to the flash too quickly and that's why the read data was all wrong. Now I've increased the timings so the delay between commands is longer. Here's a new bootloader (https://drive.google.com/file/d/1cnL8L_XqhzjZzDtpLE2iTVCo9iu5O6_s/view?usp=sharing) to try. Fingers crossed...
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on July 09, 2022, 10:06:10 AM
The output from this version looks very reasonable to my untrained eyes!  ;D

https://drive.google.com/file/d/1jorB9t9JSbcazm8ZPJwVyVw5aecDNvrK/view?usp=sharing (https://drive.google.com/file/d/1jorB9t9JSbcazm8ZPJwVyVw5aecDNvrK/view?usp=sharing)
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 09, 2022, 04:02:09 PM
Looks good to me! The dump matches up with the v2.7 firmware images.

All that's left to do is try installing the v6 bootloader build and see if it can boot Rockbox and the original firmware.
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on July 09, 2022, 08:27:44 PM
Great!

First, for good measure; a corrected zip with the bootloader backup - I forgot this file in the previous one: https://drive.google.com/file/d/1-zqsdh3BWI4Q0mxOGWuB8L2nor_43X7W/view?usp=sharing (https://drive.google.com/file/d/1-zqsdh3BWI4Q0mxOGWuB8L2nor_43X7W/view?usp=sharing)

I ran the install and update from the bootloader menu with success (having renamed the bootloader-v6 file to "bootloader.erosq" on the SD-card, else the installation gives a file not found error, naturally), and the latest native rockbox seems to start fine. Dual boot also works, so this looks good.


Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 10, 2022, 08:55:25 AM
Cool! ;D

I'll update the official bootloader builds and wiki soon. I think it's pretty safe to say newer Surfans F20 units with FW v2.7 are now supported.
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on July 11, 2022, 05:32:46 AM
Nice work, amachronic - many thanks! :D 8)

The native dual boot setup is a good one to have, providing the rockbox goodness for headphones, but also catering for the occasional need for the line out or the bluetooth function throught the aigo player.

Speaking of which, now that the status of Surfans F20 v2.7 will be moved to supported, should I open a separate thread/issue (or even bug report) about the silence of the line out? And, would you have any ideas on how one can proceed to investigate this problem?

My sincerest thanks again for your efforts!
Title: Re: Surfans F20 "NAND open error"
Post by: JosephM on July 18, 2022, 11:16:41 PM
Cool! ;D

I'll update the official bootloader builds and wiki soon. I think it's pretty safe to say newer Surfans F20 units with FW v2.7 are now supported.

I hate to revive the thread, but I don't think that's the case. I got a new unit today with the 2.7 FW and it seems like it has yet another flash chip. (Or at least I'm hitting the same nand read error, even with the v6 bootloader.) Using the debug code provided, I got

Code: [Select]
readID opcode  = FF C8 D1 C8
readID address = C8 D1 C8 D1
readID dummy   = D1 C8 D1 C8
sfc params0  = 06 05 04 03
sfc params1  = 02 55 AA 55
sfc params2  = 00 63 02 02
sfc params3  = A4 2F 00 00
which from looking at the Linux SPI Nand identification code makes me think it's the GigaDevice GD5F1GQ4UExxG. https://www.gigadevice.com/datasheet/gd5f1gq4xexxg/ (https://www.gigadevice.com/datasheet/gd5f1gq4xexxg/)
Title: Re: Surfans F20 "NAND open error"
Post by: Falco98 on July 19, 2022, 11:59:16 AM
I think it's pretty safe to say newer Surfans F20 units with FW v2.7 are now supported.

That's good news.  The unit I bought a couple months ago came with 2.7 and I felt a little "dirty" forcing a downgraded FW version (2.5) onto it, even though that worked about as well as we expect any builds to work at present (AFAIK).  Can you advise me whether I should try upgrading soon?  I've enjoyed following the tech discussion here, but must admit it's somewhat over my head.

Also, purely as an aside: this unit is eventually intended for my FIL to be his car music player (hardwired, since we already know BT is off the table for the foreseeable future), but the one thing that'll need to be working before that is for USB charging to function correctly (just fwiw); since it boots to USB now instead of to the player, i'm afraid it won't work for him since I'd be telling him to just leave it plugged in in his car.  Just mentioning this here in case anyone has any insight as to whether i should expect this to ever be fixed.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 19, 2022, 03:45:16 PM
I hate to revive the thread, but I don't think that's the case. I got a new unit today with the 2.7 FW and it seems like it has yet another flash chip. [...]

Here's an updated bootloader (v7) (https://drive.google.com/file/d/1eRNxn0B_V36kNtH8oHJkmDKnuuxaZZJ2/view?usp=sharing) with support for the GD5F1GQ4xExxG. Upload a full dump (debug tools > dump entire flash, zip the resulting flash.img). Or check it yourself by comparing against uboot.bin in the OF image.

kaas, twotoneblue - could either of you provide another dump with the v7 bootloader to ensure it still works with the Winbond flash? I made a couple tweaks, which shouldn't have broken anything but it's a good idea to test again just in case. Thanks.

Title: Re: Surfans F20 "NAND open error"
Post by: JosephM on July 19, 2022, 07:56:25 PM
I hate to revive the thread, but I don't think that's the case. I got a new unit today with the 2.7 FW and it seems like it has yet another flash chip. [...]

Here's an updated bootloader (v7) (https://drive.google.com/file/d/1eRNxn0B_V36kNtH8oHJkmDKnuuxaZZJ2/view?usp=sharing) with support for the GD5F1GQ4xExxG. Upload a full dump (debug tools > dump entire flash, zip the resulting flash.img). Or check it yourself by comparing against uboot.bin in the OF image.

kaas, twotoneblue - could either of you provide another dump with the v7 bootloader to ensure it still works with the Winbond flash? I made a couple tweaks, which shouldn't have broken anything but it's a good idea to test again just in case. Thanks.

Wow, that was fast, thanks so much!!

I'm not sure how to compare it against the uboot.bin, they're wildly different sizes, so I assume I would need to extract the bootloader. But here's the link https://drive.google.com/file/d/1OzyUtGlceIe7iKbYWZ-6JZ3-h2MjnyMJ/view?usp=sharing (https://drive.google.com/file/d/1OzyUtGlceIe7iKbYWZ-6JZ3-h2MjnyMJ/view?usp=sharing).


I should add, I'm also able to take a bootloader backup and there are some strings in it that make be think it's not total gibberish. And I'm able to boot the native firmware.

I also checked the dump of of_player.img against the one posted earlier in this thread and they hash the same. Compared to the whole flash image shown earlier in this thread, the binwalk output is identical (though the files do differ), so I'm pretty much convinced that it is working, so I'm going to install the bootloader.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 20, 2022, 10:24:21 AM
Your dump is mostly OK and matches up with twotoneblue's dump and the vanilla FW images, except the first 4 pages (up to offset 0x1fff) are zeroed, and that's definitely a problem. Could you check if the bootloader backup is zeroed in the same way? The first bytes should be 06 05 04 03 02 55 aa 55 in a good dump (the same as what is shown in the SFC params).
Title: Re: Surfans F20 "NAND open error"
Post by: JosephM on July 20, 2022, 06:53:12 PM
The bootloader doesn't appear to be zeroed in the same way, but those aren't the first few bytes. https://drive.google.com/file/d/16PQF--F50bQDUA247X2nKnnlN6_DvHpC/view?usp=sharing (https://drive.google.com/file/d/16PQF--F50bQDUA247X2nKnnlN6_DvHpC/view?usp=sharing)

Code: [Select]
0000000 0506 0304 5502 55aa 6300 0202 2fa4 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000800 8007 4002 0000 0000 0002 3442 8007 4082

I also tested installing the rockbox bootloader last night. That worked. I just tried restoring from my bootloader backup and that worked perfectly too.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 20, 2022, 08:49:34 PM
The bootloader doesn't appear to be zeroed in the same way, but those aren't the first few bytes.
Code: [Select]
0000000 0506 0304 5502 55aa 6300 0202 2fa4 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000800 8007 4002 0000 0000 0002 3442 8007 4082
That's good, and the bytes are the same; you're looking at 16-bit little endian values, effectively swapping every pair of bytes.

Quote
I also tested installing the rockbox bootloader last night. That worked. I just tried restoring from my bootloader backup and that worked perfectly too.
Did you do the bootloader backup or the full dump first? If you don't mind, could you also try a few bootloader backups from USB boot and inspect each one, and see if any of them get zeroed? (to check if this a transient error that pops up "randomly" or does it occur predictably on the first dump.)
Title: Re: Surfans F20 "NAND open error"
Post by: JosephM on July 20, 2022, 09:14:10 PM
Lol, whoops, don't know how I missed that it was just little endianed.

As for the dumps I did the full dump first. But I also did subsequent bootloader dumps on fresh boots and they were all the same. And now I can't recreate the problematic full-flash dump (I tried four or five times).

When checking all the files, I noticed that the OFNI flash info file from that same boot was also zeroed. So maybe in the shuffle of files between devices and unplugging without unmounting, etc, the filesystem got corrupted? (I have since wiped and reformatted the drive since b/c I was getting weird errors.)
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on July 21, 2022, 05:54:24 AM
So it's probably a filesystem error and nothing wrong with the flash, thank you for investigating.
Title: Re: Surfans F20 "NAND open error"
Post by: twotoneblue on August 01, 2022, 03:11:49 PM
kaas, twotoneblue - could either of you provide another dump with the v7 bootloader to ensure it still works with the Winbond flash? I made a couple tweaks, which shouldn't have broken anything but it's a good idea to test again just in case. Thanks.

Dear all,

Apologies for not seeing the updates here - for some reason the notification didn't reach me. Here is the usual package with the v7 bootloader: https://drive.google.com/file/d/15Tw912xBi0yB0LDxorQVqi4igAxwtAQg/view?usp=sharing (https://drive.google.com/file/d/15Tw912xBi0yB0LDxorQVqi4igAxwtAQg/view?usp=sharing)

There are a few differences - I believe you can make more sense of them than me.

Thanks for your continued investigations, everyone!
Title: Re: Surfans F20 "NAND open error"
Post by: Ren on August 04, 2022, 03:10:03 AM
I bought a Surfans F20 Player as well and I want to install the native port on it.
I wasn't able to make a backup of the original bootloader with the bootloader provided from the wiki => "NAND open error (5).
 
I read through this thread that i stumbled upon when I searched for the error above.
I booted into bootloader-v7.erosq (from linux) and made a flash.img dump, flash_info.txt and a flash_onfi_info.txt using the debug tools of the v7 bootloader.
Here are the fileshttps://mega.nz/file/GCoF2DzS#KPCE35PTVlo6Twy3H3Qa5tdvrd1DiP4syjynI1O22LU (https://mega.nz/file/GCoF2DzS#KPCE35PTVlo6Twy3H3Qa5tdvrd1DiP4syjynI1O22LU).
I hope this helps in getting the natitve build stable on the SURFANS F20?!
Is it save to proceed with the installation of the native port with the latest (v7) bootloader from this thread?

Flash info:
readID opcode  = FF C8 D1 C8
readID address = C8 D1 C8 D1
readID dummy   = D1 C8 D1 C8
sfc params0  = 06 05 04 03
sfc params1  = 02 55 AA 55
sfc params2  = 00 63 02 02
sfc params3  = A4 2F 00 00

flash_onfi_info:
signature = FFFFFFFF
revision = FFFF
manufacturer = "ÿÿÿÿÿÿÿÿÿÿÿÿ"
device model = "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"
JEDEC mf. id = FF
data bytes per page = 4294967295
spare bytes per page = 65535
pages per block = 4294967295
blocks per lun = 4294967295
number of luns = 255
bits per cell = 255
max bad blocks = 65535
block endurance = 65535
programs per page = 255
page program time = 65535
block erase time = 65535
page read time = 65535

edit:
I installed the ROCKbox native port from the v7 bootloader, after a success message I first booted into ROCKbox from the BOOT Menue, this worked.
Then I rebooted and I just got a flickering screen.
So I powered the device off by long pressing power.
A new press on power just gives me the flickering screen again...
So I loaded the v7 bootloader from command promt again...
I reinstalled ROCKbox and powered off after.
I pressed power again and all I got is a flickering screen again.
So I started the bootloader again and created a Flashdump and the info files again.
here are they https://mega.nz/file/jTQS1K6Y#2OMx0mlbN7KqH24NBsz7AEeZqBCtWyXwTirj_9ecDxM

Then I restored the original bootloader. Now the player is working again with its original Firmware (not with ROCKbox sadly). I hope you will have success in getting the thing working with ROCKbox! If you need something else from me I try to provide it to you.
Title: Re: Surfans F20 "NAND open error"
Post by: amachronic on August 07, 2022, 10:06:01 AM
I bought a Surfans F20 Player as well and I want to install the native port on it.
[...]
Is it save to proceed with the installation of the native port with the latest (v7) bootloader from this thread?
[...]
Flash info:
readID opcode  = FF C8 D1 C8
readID address = C8 D1 C8 D1
readID dummy   = D1 C8 D1 C8
[...]

This shows you have the GigaDevice flash (same as JosephM's) so yes it's safe to install with the v7 bootloader.

Quote
I installed the ROCKbox native port from the v7 bootloader, after a success message I first booted into ROCKbox from the BOOT Menue, this worked.
Then I rebooted and I just got a flickering screen.
So I powered the device off by long pressing power.
A new press on power just gives me the flickering screen again...
So I loaded the v7 bootloader from command promt again...
I reinstalled ROCKbox and powered off after.
I pressed power again and all I got is a flickering screen again.
So I started the bootloader again and created a Flashdump and the info files again.
here are they https://mega.nz/file/jTQS1K6Y#2OMx0mlbN7KqH24NBsz7AEeZqBCtWyXwTirj_9ecDxM

Then I restored the original bootloader. Now the player is working again with its original Firmware (not with ROCKbox sadly). I hope you will have success in getting the thing working with ROCKbox! If you need something else from me I try to provide it to you.

I don't know what the issue is, but if you try a few things it might help narrow things down:
Also if you could explain what you mean by the screen "flickering" that would help. Can you see the Rockbox logo or menus? Do they look corrupted? Or do you see randomly colored "noise"? Better yet, post a video of the problem if you can. It doesn't have to be great, as long as the problem is visible.
Title: Re: Surfans F20 "NAND open error"
Post by: Abscissa on August 09, 2022, 01:48:22 AM
I bought a Surfans F20 Player as well and I want to install the native port on it.
[...]
Is it save to proceed with the installation of the native port with the latest (v7) bootloader from this thread?
[...]
Flash info:
readID opcode  = FF C8 D1 C8
readID address = C8 D1 C8 D1
readID dummy   = D1 C8 D1 C8
[...]

This shows you have the GigaDevice flash (same as JosephM's) so yes it's safe to install with the v7 bootloader.

FWIW, it appears that I have the same one, too. (Also a v2.7 Surfans F20.)

In my case, I installed the v2.5-based hosted (not native) version of rockbox. (See my second post over here: https://forums.rockbox.org/index.php/topic,54280.msg250792.html ) Seems to work as expected for me. As expected, the line-out no longer works (in either rockbox or the original player), but other than that rockbox seems to work fine. That said, I HAVE been experiencing some occasional quirks, maybe bugs, here and there, but nothing that seems likely (IMHO) to be related to the minor hardware/software mismatch between v2.5 and v2.7 (more likely related to my large, chaotic song collection, and maybe my settings preferences, pushing some of rockbox's limits the wrong way). I *am* taking notes though, so that I can narrow them down and file any issues as appropriate.

NOTE: Everything that follows in the rest of this post is most likely ENTIRELY UNimportant! I'm only making note of it here just because I happen to find it interesting...

Ok, so, as I mentioned here ( https://forums.rockbox.org/index.php/topic,54280.0.html ), I did a diff between the bootloader image that was pre-installed on my device (backed up via jztool before I flashed ANYTHING), versus the bootloader image in the official (non-rockbox) v2.7 .upt update file.

I can post links to my actual backed-up pre-installed bootloader image, and/or the output of radiff2's comparison, if anyone happens to be interested (and if it's kosher here - I don't want to open up any potential "legality" cans-o-worms I might not know about)

I got hold of radiff2 and looked at the diff it gave me. The way it shows things isn't really how I'm accustomed to looking at differences, so fwiw, I just stuck with my usual tool, Beyond Compare, and did a hex comparison in that.

Not really knowing what in hell I'm looking at, but having been told that *some* differences are apparently expected, I'm sufficiently convinced (99%-ish) that my dump was succesful and without error. It seems mostly the same as the official distributed image, and there's a fair amount of pattern to the differences that do exist. It's these patterns in the differences that I find interesting (albiet, unlikely to actually be significantly important for rockbox, I would imagine).

The differences, FWIW:

- Whatever kind of header this uses had a couple of bytes different: At addresses 0x0009 and 0x000C. Header stuff, so probably no big alarm.

- After that, everything up through address 0x0900 is identical.

- Between addresses 0x0900 to 0x2C88, it's all peppered with occasional single-byte differences. But what's interesting is that the vast majority (all?) of the bytes which are different, have values that are EXACTLY +0x10 greater in my dump as compared to the "official". Seems likely a changed offset?

- In the 48 bytes from 0x2CA0 to 0x2CD0, there are several bytes different. Mostly very close to their alternate values, within a difference of about +/-6 for most of them. Maybe some kind of sub-header?

- Very shortly after that, my dump has the following 16 bytes *inserted* (in comparison to the official image) at address 0x2D08:

C8 51 00 00 18 00 00 00 C8 51 00 00 18 00 00 00

This insertion of 16 bytes in my dump (vs "official") would seem to (likely?) explain all the earlier, presumable "offset" values being EXACTLY 0x10 greater in my dump (vs "official"). Maybe those values were (either directly or indirectly) referencing things within the chunk that begins here.

- After that, there's some identical data, and then a block of all-0xFF on both images starting at 0x2FB4. But the all-0xFF block is longer on the "official" image. The last, roughly quarter, of this all-0xFF block in the "official" image is replaced in my dump with various data (Maybe about a third or so of them are zeroes, though.)

- Then there's a big block of identical data from addresses 0x4004 to about 0x6004.

- From 0x6004 to the end of my dump (at 0x1FFFF), the data is mostly identical, but peppered throughout with occasional single byte differences, and also some two-byte words that are different. But even these differences seem to have some patterns:

For the single-byte differences: These mostly (maybe entirely?) have the exact same low 4-bits between both versions. It seems to mainly be the upper 4-bits that are different. There might be further pattern to that too, but I'm not sure yet.

For the two-byte words that are different (these are notably less numerous than the single-byte differences, but there's still a lot of them): For the first byte of the pair (the byte with the lower address), the low (less-significant) 4-bits tend to match and the upper (more significant) 4-bytes tend to differ. For the second byte of the pair (the byte with the higher address), it's reversed: The high 4-bits tend to match, and the low 4-bits tend to differ.


Title: Re: Surfans F20 "NAND open error"
Post by: Ren on August 09, 2022, 03:39:35 PM
I don't know what the issue is, but if you try a few things it might help narrow things down:
  • Go into the bootloader menu (hold volume up when powering on) and boot Rockbox - see if the LCD flickers
  • Boot the original firmware from the bootloader menu - check if the LCD works
  • Boot the original firmware by holding PLAY when powering on
Also if you could explain what you mean by the screen "flickering" that would help. Can you see the Rockbox logo or menus? Do they look corrupted? Or do you see randomly colored "noise"? Better yet, post a video of the problem if you can. It doesn't have to be great, as long as the problem is visible.

I made 2 videos (https://mega.nz/folder/aKgCRDBJ#wk3aP5xb8gIRiHlPxxs8nQ) of the issue as requested. Maybe seeing it yourself says more than me making a lot of words trying to describe the flickering.

Greetings Ren
Title: Re: Surfans F20 "NAND open error"
Post by: Oscar on August 09, 2022, 04:54:21 PM
I made 2 videos (https://mega.nz/folder/aKgCRDBJ#wk3aP5xb8gIRiHlPxxs8nQ) of the issue as requested. Maybe seeing it yourself says more than me making a lot of words trying to describe the flickering.
Just a wild guess. Could it be, that you have installed the original "bootloader.erosq". When you install the bootloader from the Rockbox recovery menu (the bootloader which you have started with jztool), you will actually install the file "bootloader.erosq" from your SD-card. This file has as well to be the version 7 bootloader. So you have to copy the file "bootloader-v7.erosq" to the SD-card and rename it to "bootloader.erosq" before installing the bootloader. As said this is just a wild guess.
Title: Re: Surfans F20 "NAND open error"
Post by: Ren on August 09, 2022, 05:29:26 PM
I made 2 videos (https://mega.nz/folder/aKgCRDBJ#wk3aP5xb8gIRiHlPxxs8nQ) of the issue as requested. Maybe seeing it yourself says more than me making a lot of words trying to describe the flickering.
Just a wild guess. Could it be, that you have installed the original "bootloader.erosq". When you install the bootloader from the Rockbox recovery menu (the bootloader which you have started with jztool), you will actually install the file "bootloader.erosq" from your SD-card. This file has as well to be the version 7 bootloader. So you have to copy the file "bootloader-v7.erosq" to the SD-card and rename it to "bootloader.erosq" before installing the bootloader. As said this is just a wild guess.
Thanks, that was really a lucky wild guess! I thought the v7 bootloader would install the v7 when the player booted into it. I still had 3 different versions of the bootloader on the sd. I didn't expected that to be a problem.... But it turned out to be one. Thankfully the problem is resolved now!
Thanks again! :)