Rockbox Development > New Ports

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

<< < (66/386) > >>

funman:
Very good idea linuxstb!

And your theory is indeed confirmed.
I remember testing this by writing to the memory and reading back and the values didn't match, but I probably messed up my test.

This time I'll attach my code (test.S for svn checkout) so others can proof-read and test it.

It confirms that we can write to the memory, and I also checked the CCU_MEMMAP register : it indicates that RAM is mapped at offset 0x0

I'll try to assemble the parts needed for using your method and call for e200 testers to be sure just to be sure :)

Also I think we could measure the size we gain on different firmware versions to get the maximum.

EDIT: here are the sizes we can use for our bootloader (padding was not taken into account):
clip v01.01.17 40756 bytes
clip v01.01.18 41247 bytes
clip v01.01.20 41430 bytes
clip v01.01.29 41934 bytes
fuze v01.01.11 38746 bytes (note : strings on the file reports V4.0.45A, could it be because the firmware is more modern ?)
e200 v03.01.16 41727 bytes

So that means ~40 kB (plus the padding of the firmware block, less the button check and the decompressing function), quite enough for now ;)

atomikpunk:
Hi peeps,

well I started coding the LCD driver for the clip. But coding it in C makes it quite big though I doubt it would be much smaller coding it directly in assembly. So yeah, I'd be very interested if you (funman? linuxstb?) get to make a "decompilable" OF that would lend us some space :P

The LCD driver would be helpful for debugging purposes but I doubt we will leave it in the first "stage" once we're there. I guess we will load it from the NAND which will leave us with much more playing space...

linuxstb:

--- Quote from: funman on September 30, 2008, 07:40:02 PM ---So that means ~40 kB (plus the padding of the firmware block, less the button check and the decompressing function), quite enough for now ;)

--- End quote ---

And of course we can also ucl-compress our bootloader, which should take it up to about 60-70KB...

This should be enough for a full Rockbox bootloader, which are typically about 40-60KB.  So this would seem to be a long-term solution.

EDIT: I have now committed to SVN my first attempt at adapting mkamsboot to do this.  Please can all interested people look at this code, compile and disassemble it.  It's NOT safe to run yet, but I committed it so other people can see it and help review it.

funman:
The actual code (revision 18676) is confirmed to NOT work.

If you want to debug it you can use skyeye arm emulator.

I use the following skyeye.conf:

--- Code: ---cpu: arm920t
mach: at91rm92

mem_bank: map=M, type=RW, addr=0x00000000, size=0x00050000, file=./fw.bin
mem_bank: map=M, type=R, addr=0x00100000, size=0x00010000
mem_bank: map=M, type=RW, addr=0xc0000000, size=0x00200000
mem_bank: map=M, type=RW, addr=0x20000000, size=0x000f0000
mem_bank: map=M, type=RW, addr=0xc0200000, size=0x00500000
mem_bank: map=M, type=RW, addr=0xc0700000, size=0x01900000
mem_bank: map=I, type=RW, addr=0xfffa0000, size=0x00060000

load_addr:base=0x20000000, mask=0xFFFF
--- End code ---

with fw.bin being the patched firmware block.

skyeye expects an elf program, I use the following to start execution of our firmware:

--- Code: ---int _start(void) {

    asm volatile( "mov r0, #0" );
    asm volatile( "bx r0" );

loop: goto loop; /* remove the asm statements to put skyeye in an infinite loop */

    return 0;
}
--- End code ---

Note, to use gdb with skyeye, use the -d option of skyeye and connect to the running gdbserver like you would do on any other remote gdb (use a gdb built for arm of course).

pedrov:
Hi all,

I borrowed a JTAG usb interface from my firm (it looks like this : http://www.iar.com/website1/1.0.1.0/369/1/index.php), and I have a sansav2 e2xy model. I would like to know if I could help you on the port, but I don't have any experience on hardware tweaking. IIRC, atomikpunk already succeeded in connecting a JTAG interface on the device. Any advice ?

Regards,

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version