Newbie trying to create new firmware version - page 3 - General Discussion and Assistance - CHDK Forum

Newbie trying to create new firmware version

  • 31 Replies
  • 7495 Views
*

Offline reyalp

  • ******
  • 13143
Re: Newbie trying to create new firmware version
« Reply #20 on: 22 / April / 2010, 18:24:51 »
Advertisements
You probably aren't going to resolve this by a shotgun approach of trying things until it works, you need to read and understand the makefiles, and trace through the process until you find what is wrong.

Make sure you do a "make clean" between building different firmwares. In general, unless you are just changing .c files, you should always do a full build, e.g.
make clean fir

For the already ported cameras, there are correct versions of the generated already checked in. Compare these with what your build generates.

Make sure your reference dumps are OK. You can usually do this by comparing the generated files to the checked in one. If the output isn't identical, chances are there is something wrong with the dump you are using.

Generated files that may be of interest are
tools/signatures_dryos.h
<platform>/sub/<platformsub>/
stubs_entry.S
stubs_auto.S
Don't forget what the H stands for.

Re: Newbie trying to create new firmware version
« Reply #21 on: 22 / April / 2010, 19:11:56 »
I don't think I've yet got as far as you think! At the moment I am not changing any files, I am just trying to compile the existing 100d firmware to prove I have a working environment (which I obviously don't!!) I'm still trying to understand how if 'ixus960_sd950 works for me out of the box' as you say, why doesn't it work for me when I am using a newly created build environment 'out of the box' and a firmware dump and ref sigs from the chdkdumps files on drop.io - the only sources available as far as I can see? I can't see where the problem can lie when I haven't altered anything from the original downloads which appear to work for you and everyone else.

Sorry if this sound terse - it isn't meant to. I really appreciate the time you've given, but it's frustrating when a system works on one computer and not another for no explicable reason. I'll give it one last shot tomorrow and then the camera goes on ebay!!

*

Offline reyalp

  • ******
  • 13143
Re: Newbie trying to create new firmware version
« Reply #22 on: 22 / April / 2010, 23:47:03 »
At the moment I am not changing any files,
That was exactly what I assumed in my post.
Quote
I am just trying to compile the existing 100d firmware to prove I have a working environment (which I obviously don't!!) I'm still trying to understand how if 'ixus960_sd950 works for me out of the box' as you say,
Right, which is why you need to actually actually understand the part of the process that is failing, and why I suggested areas to look at.
Quote
I can't see where the problem can lie when I haven't altered anything from the original downloads which appear to work for you and everyone else.
Since the impossible is happening, it must actually be possible ;)
It is a puzzle, but the only way you are going to resolve it is by actually understanding the process and identifying the cause.

One thing that can cause odd results is that if you pick up the wrong tools on your path, so instead of getting the binaries provided with the CHDK tool chain, you get something else. But again, the first thing to do is identify which part is being generated incorrectly.
Don't forget what the H stands for.

Re: Newbie trying to create new firmware version
« Reply #23 on: 23 / April / 2010, 11:06:44 »

For the already ported cameras, there are correct versions of the generated already checked in. Compare these with what your build generates.

Generated files that may be of interest are
tools/signatures_dryos.h
<platform>/sub/<platformsub>/
stubs_entry.S
stubs_auto.S

Do you mean compare these files from a new version of trunk 885 with the versions that exist after attempting to compile 100d? If so, some addresses in stubs_entry.S change (and some error messages are present) but the other files are identical.

Quote
If the output isn't identical, chances are there is something wrong with the dump you are using.

It came from the dump archive - are there alternatives?

Quote
you need understand the makefiles

if that is absolutely a necessity then perhaps I should throw in the towel, as that isn't going to happen without a lot of self-teaching that unfortunately I don't have sufficient free time for.


*

Offline reyalp

  • ******
  • 13143
Re: Newbie trying to create new firmware version
« Reply #24 on: 24 / April / 2010, 21:27:06 »
Do you mean compare these files from a new version of trunk 885 with the versions that exist after attempting to compile 100d?
Yes. Or any other camera that you are unable to build from scratch.
Quote
If so, some addresses in stubs_entry.S change (and some error messages are present) but the other files are identical.
Sounds like your dump is bad, although tool problems are also possible. Did you look at the generated headers in the tools directory ? These should also be different if your stubs_entry.S is different.

Note, you can use svn diff (or if you are using tortoise, right click on the top level directory and "check for modifications") to quickly see exactly what changed.

Also "some changes" and "some error messages" doesn't give us a lot to go on. If you post the actual, specific output, we might be able to give specific advice. Please create a diff and post it as an attachment, or zip the changed files and post that. In tortoise you can use "create patch" to generate a file that contains all the differences.
Quote
Quote
If the output isn't identical, chances are there is something wrong with the dump you are using.

It came from the dump archive - are there alternatives?
Bad files have been uploaded occasionally, and I have no way of knowing which file you are referring to. So yes, there are alternatives.
Quote
if that is absolutely a necessity then perhaps I should throw in the towel, as that isn't going to happen without a lot of self-teaching that unfortunately I don't have sufficient free time for.
Chances of porting without understanding are low.
Don't forget what the H stands for.

Re: Newbie trying to create new firmware version
« Reply #25 on: 26 / April / 2010, 06:04:06 »

Do you mean compare these files from a new version of trunk 885 with the versions that exist after attempting to compile 100d?
Quote
Yes. Or any other camera that you are unable to build from scratch.
Does that mean that to have a working environment I need to build all firmware versions of all cameras with all firmware dumps in place (although I am only interested in one version of one camera?) If it does, can all the necessary files be downloaded from one location? Or does it all have to be done from scratch? Or have I misunderstood your comment (I hope!)
 
Quote
"some changes" and "some error messages" doesn't give us a lot to go on. If you post the actual, specific output, we might be able to give specific advice.
Sorry. I was being deliberately unspecific as I wasn't sure if you were prepared to be 'hands-on' or not.
Quote
Please create a diff and post it as an attachment, or zip the changed files and post that. In tortoise you can use "create patch" to generate a file that contains all the differences.
OK. I use a different diff program, so I've attached a zip of the relevant files, before and after. I was wrong when I said there were no changes to signatures_dryos.h - that file changed, as did stubs_entry.S -  stubs_auto.S was unchanged.
Quote
If the output isn't identical, chances are there is something wrong with the dump you are using....there are alternatives.

I was using ixus960_sd950_100d.7z from drop.io/chdkdumps2.
Quote
Chances of porting without understanding are low.
I appreciate that - but in my defence when I started on this I was only trying to follow the procedure explained in 'Adding support for new firmware version of existing port' and I understand that (now that the typo regarding stubs_entry.s and stubs_entry_2.s has been corrected - I was scratching my head over that one for several days!)

Re: Newbie trying to create new firmware version
« Reply #26 on: 26 / April / 2010, 13:04:54 »
Update - today I tried to compile CHDK files for 19 different cameras. 10 out of 10 VxWorks were successful, but only 2 out of 9 DryOS .... a coincidence, or does this suggest a possible problem with my DryOS sig ref files? If so, where can I download some new ones from an alternative source (the ones I have now came from drop.io/chdkdumps)?

*

Offline reyalp

  • ******
  • 13143
Re: Newbie trying to create new firmware version
« Reply #27 on: 26 / April / 2010, 23:56:26 »
Does that mean that to have a working environment I need to build all firmware versions of all cameras with all firmware dumps in place (although I am only interested in one version of one camera?)
No, absolutely not. I'm sorry if my post was not clear. What I meant is that any camera you get the error on would provide the same insight into the problem. You can build any individual camera, and in fact you must make clean if you are are going to switch between them.

Quote
I was using ixus960_sd950_100d.7z from drop.io/chdkdumps2.
Chances are the problem is with one of the dryos reference reference binaries, not the actual camera dump.

Looking at your signatures_dryos.h, it clear that sig_ref_dryos_2 is bad in some way, because it produces very different output for many functions.

Quote
I understand that (now that the typo regarding stubs_entry.s and stubs_entry_2.s has been corrected - I was scratching my head over that one for several days!)
My fault. I'm sorry for that.

edit:
I should add that you can completely ignore the vxworks stuff.
Don't forget what the H stands for.


Re: Newbie trying to create new firmware version
« Reply #28 on: 27 / April / 2010, 09:29:31 »
it clear that sig_ref_dryos_2 is bad in some way

Brilliant - you got it spot on. I'm extremely embarrassed to say what I did wrong, but if you don't know the Canon range inside out (and don't take enough time over things) it's possible to get mixed up between SD1100 and A1100...

100d now compiles and I have an error-free stubs_entry.S for 100e.

Unfortunately I've deleted my new 100e .c files during the fault finding process, so I have to rebuild them. I hope to report back in a few days. Again, thanks for your invaluable help. Let's hope we have a working 100e to show for it soon.

*

Offline reyalp

  • ******
  • 13143
Re: Newbie trying to create new firmware version
« Reply #29 on: 28 / April / 2010, 21:30:34 »
it clear that sig_ref_dryos_2 is bad in some way

Brilliant - you got it spot on. I'm extremely embarrassed to say what I did wrong, but if you don't know the Canon range inside out (and don't take enough time over things) it's possible to get mixed up between SD1100 and A1100...
Glad you finally got it figured out!

I assure you, I have never confused an Ixus 870 with an SD870 or an SD850 with an Ixus 850.  Honest! :-X
Don't forget what the H stands for.

 

Related Topics