Rockbox Development > New Ports

SanDisk Sansa c200v2, m200v4, clipv1, clipv2, clip+, and fuzev2

<< < (48/386) > >>

funman:

--- Quote from: atomikpunk link=topic=14064.msg133624#msg133624 date=1220374692
[b ---First stage bootloader[/b]
The first stage would be located in the firmware block, after the used part (that is after the code and the variable initialization sections). It needs to be as small as possible to fit every possible OF files. If we find out that we can increase the firmware block size, then we are in luck. If not, we may need an alternative location for that. I assume that we will a) have enough space in the OF file without modification, or b) we will be able to increase the firmware block size.

Its job is:

* Intercept a particular signal (a button or something), and if not set, boot back to the OF (its job end up here in this case)
* Find (or maybe it should already know) the second stage bootloader
* Copy it from ROM to RAM
--- End quote ---

At boot we suppose ROM is mapped at 0x0, and we earlier confirmed that we can not read past the firmware block (at least this not the direct continuation of the firmware file)

So we first need to extend the firmware block, and as far as I know this has never been tried.

My theory is that you simply can not read from the library blocks, because they are loaded on-demand, and no one is ever loaded forever.
If it was the case, then the code would be a part of the firmware block.

We can suppose the library blocks are relocatable (because the code use addresses to the mapping of the block in RAM; which is absolute).
But the firmware block may have absolute offsets to the library blocks, even if we don't see a cross reference into a disassembler.

I expect fragile_matter to flash an extended firmware (by 0x200, then BOOTLOADER_STAGE2_SIZE) and tell us if he still can boot the OF and use it, and tell us the results.

Last note: ROM is 1Mbit (128kB), the one I use (firmware v17) is 120kB, that's 8kB left for the bootloader, would it be enough ?

sucitrams:

--- Quote from: funman on September 02, 2008, 01:47:37 PM ---I expect fragile_matter to flash an extended firmware (by 0x200, then BOOTLOADER_STAGE2_SIZE) and tell us if he still can boot the OF and use it, and tell us the results.

--- End quote ---

I'm not fragile_matter, but I tried to extend the firmware by 0x200 simply by modifying the mkamsboot.c . Then I flashed it and was able to boot the OF, without errors etc.

This is maybe interesting: I flashed the player with the extended firmware, and plugged it back to the PC,  and the firmware file wasn't deleted, as usual.

funman:
did the player display the message "upgrade completed" ?

also if you read the recovery partition, do you see your extended firmware, or the normal one ?

sucitrams:
Sorry my fault.  :-\
The extended firmware wasnt flashed. The upgrade didn't complete.

EDIT: I tried to flash the extended Firmware directly onto Flash. The player started, but the Display was full of "damaged" pixels.

EDIT2: I think its over. Everytime i try to write to flash, there are "IO errors", and only 14MB could be written.

fragilematter:
sucitrams take care when dd-ing stuff directly not to damage the file system. On e200v2's, beyond 31,456,252 Bytes you have a fat header and the music database. Or, if you do write directly to the nand, back up the stuff you have stored on the player.

I'll be resuming almost full time on rockbox testing tomorrow afternoon (I'm still in vacation, I only have one restant exam tomorrow). Hopefully I'll be able to complete the GPIO tests by tomorrow night and also catch up on what's new here.

Edit: if you get write errors try to use a stable usb port (the ones at the back of the computer) and eventually try to use usb 1.1 (modprobe -r ehci_hcd if you don't have a machine with physical usb 1.1 ports).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version