Eos 400d ( Rebel XTI ) - page 174 - DSLR Hack development - CHDK Forum

Eos 400d ( Rebel XTI )

  • 1871 Replies
  • 891070 Views
*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1730 on: 19 / April / 2013, 04:45:14 »
Advertisements
My only interest to get rid of entry.S was to eliminate all traces of any code that could be suspicious of being remotely derived from code written by others... if you know what I mean. Sergei did most of that job, when he applied the cache hack; but there were some lines in the entry.S file, that I did not know where had originated, and thus my question.

Obviously, an ASM file with a single jump is perfectly fine with respect to my concerns; not as clean as having some "main" function in a C file, but completely safe. Once we have reached this point, I would not spend much time on the issue.

Actually, the entry.S that we have so far had nothing to do with other's code ;)
The problem is that we have C code that is not hard to recognize who wrote it... :)
But that can be changed too ... with not so much effort, we can get rid of these parts and hookup our code with cache-hacks.
// AF

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1731 on: 19 / April / 2013, 15:29:45 »
I think if we convert stubs.S to c code we probably can get rid of entry.S and have our "start" function in C.

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1732 on: 22 / April / 2013, 10:01:00 »

Re: Eos 400d ( Rebel XTI )
« Reply #1733 on: 22 / April / 2013, 15:57:24 »

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1734 on: 22 / April / 2013, 21:02:35 »
http://hostr.co/dZC4xJUAupCC
I had to change EnableHacks() little bit. Camera was freezing at startup when trash button was pressed.
There still is another bug needs to be fixed. When shutter release button half pressed and kept down at startup, camera will freeze on GUI change. I think this bug was present for long time.

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1735 on: 23 / April / 2013, 03:43:17 »
http://hostr.co/dZC4xJUAupCC
I had to change EnableHacks() little bit. Camera was freezing at startup when trash button was pressed.
There still is another bug needs to be fixed. When shutter release button half pressed and kept down at startup, camera will freeze on GUI change. I think this bug was present for long time.


I think you should be able to change this:
Code: [Select]
asm __volatile__ ( "ldr  pc, = 0xFF810000\n");
from EnableHacks();
with this:
Code: [Select]
void (*FirmwareEntry)(void*)=(void*)0xFF810000;
FirmwareEntry();
// AF

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1736 on: 23 / April / 2013, 20:39:32 »
Yes, it works. Thanks.
When I tried it before it didn't work for some reason.

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1737 on: 29 / April / 2013, 17:32:23 »
Yes, it works. Thanks.
When I tried it before it didn't work for some reason.

Sergei,
Try replacing the line with "entry.o" in your link.script
with this line:
Code: [Select]
EnableHacks = .;

and remove entry.c (and entry.o from your Makefile)

you should be able to boot it.

Instead of having entry.c with only 1 function in it, we can instruct the linker that the very first thing that should be linked is the EnableHacks() routine.

EDIT:
It should look like this:
Code: [Select]
SECTIONS {
first 0x7F0000 :
{
EnableHacks = .;
init.o;
main.o;
menu.o;
display.o;
setproperty.o;
rename.o;
font-small.o;
}
}

You can also try to make it like this:
Code: [Select]
SECTIONS {
first 0x7F0000 :
{
EnableHacks = .;
                *.o;
}
}
// AF

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1738 on: 30 / April / 2013, 07:07:29 »
It didn't work. Camera hangs right away. Not even get a blue light.   

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1739 on: 30 / April / 2013, 11:24:04 »
It didn't work. Camera hangs right away. Not even get a blue light.

Hmm strange, I will experiment with it in next few days.
// AF

 

Related Topics


SimplePortal © 2008-2014, SimplePortal