ahull
Reverting the first change and moving that line crashes the camera instantly when I load CHDK. Power light remains on, power button doesn't work, I need to pull the battery to recover. Did you want me to keep the previous change that commented out the hooks?
Does the changed function now look like this?
void __attribute__((naked,noinline)) h_usrRoot() {
asm volatile (
" MOV R12, SP \n"
" STMFD SP!, {R11,R12,LR,PC} \n"
" SUB R11, R12, #4 \n"
" SUB SP, SP, #8 \n"
" STR R0, [R11, #-0x10] \n"
" STR R1, [R11, #-0x14] \n"
" BL sub_FF8140B0 \n"
" LDR R0, [R11, #-0x10] \n"
" LDR R1, [R11, #-0x14] \n"
" BL sub_FFC1C448 \n"
" LDR R0, [R11, #-0x10] \n"
" LDR R1, [R11, #-0x14] \n"
" BL sub_FFC1CEC0 \n"
" BL sub_FF813C00 \n"
" BL sub_FF813B08 \n"
" MOV R0, #0x32 \n"
" BL sub_FFC1F444 \n"
" BL sub_FF814104 \n"
" BL sub_FF8140DC \n"
" BL sub_FF814138 \n"
" BL sub_FF814050 \n"
" BL sub_FFC1ED04 \n"
" BL sub_FF81409C \n"
);
_taskCreateHookAdd(createHook);
_taskDeleteHookAdd(deleteHook);
drv_self_hide();
// Return from subroutine
asm volatile (
" BL sub_FF812130 \n"
" LDMDB R11, {R11,SP,PC} \n"
);
}
This should actually be the correct code - all other VxWorks ports do it like this. The subroutine named sub_FF812130 is responsible for starting the startup task, putting the hooks behind it doesn't seem right. It could be that other changes are required too.
Try disabling all task hooks - including spytask, and continue like I wrote earlier (re-enabling other tasks gradually when cam is stable). Also, try diskbooting instead of the fw update way.