void __attribute__((noreturn)) my_restart(){ void __attribute__((noreturn)) (*copy_and_restart)(char *dst, char *src, long length); int i;*((volatile int *) 0xc0223030) = 0x46; // Turn on LEDfor (i=0; i<10000000; i++) // Wait a while{ asm volatile ( "nop\n" );} for (i=0; i<(blob_copy_and_reset_size/sizeof(long)); i++){ ((long*)(RESTARTSTART))[i] = blob_copy_and_reset[i]; }*((volatile int *) 0xc0223030) = 0x46; // Turn on LEDfor (i=0; i<100000; i++) // Wait a while{ asm volatile ( "nop\n" );} copy_and_restart = (void*)RESTARTSTART; copy_and_restart((void*)MEMISOSTART, (char*)blob_chdk_core, blob_chdk_core_size);}
The problem is, the entry.S of CHDK is totally different than the entry.S of the blinker (which is much bigger).
Could it be that for some reason the diskboot.bin and the ps.fi2 are not encoded properly by the toolchain? Would the camera still attempt to run the ps.fi2 if the encoding is not right?
Ok, got the SOB to work So.. NEED_ENCODED_DISKBOOT needs to be removed.The the diskboot.bin needs to be transformed into a ps.fi2 with the fi2encdec tool.Afterwards, I can use the firmware update method and it works (previously it didn't, if I had NEED_ENCODED_DISKBOOT set as 1 or 2). However, the diskboot.bin method does not work, as expected.
I use a 3 weeks old SVN, and the only valid methods for NEED_ENCODED_DISKBOOT are 1 and 2.
From looking at the makefile, you have to explicitly enable the FI2, and you need some keys that I didn't understand how to get (yes, I did read the thread, but maybe I am too tired).
And I am not making the FI2 with the makefile, I am making it with a bat that I also used with the blinker. But it is made from the diskboot.bin
So i guess you also use an old version of encoder, without support for the new NEED_ENCODED_DISKBOOT=3 option...e.g. based upon my old SX10 blinker archive which is from december 2008, with the old encoder ...