CHDK-Shell compiler not updating DISKBOOT.BIN - General Discussion and Assistance - CHDK Forum
supplierdeeply

CHDK-Shell compiler not updating DISKBOOT.BIN

  • 14 Replies
  • 4145 Views
CHDK-Shell compiler not updating DISKBOOT.BIN
« on: 10 / July / 2009, 07:03:11 »
Advertisements
I've made some minor tweaks to CHDK before beginning more major work and the changes don't seem to carry through to the binary. I've changed CAM_COLORMATRIX1 values, ticked the A590 101b box, and hit compile. The compile works and the build archive is created but the binary doesn't change. The color matrix values returned by dcpTool or DNGGetMatrix are always the original values. I've even cut all the other camera definitons from camera.h and it still returns the same numbers.

This is frustrating as I can't see what I'm doing wrong. I've selected the trunk I'm working on. I've selected the right camera. I've chopped anything to do with other cameras. Whatever I do the changes are not reflected in DISKBOOT.BIN. What am I doing wrong? I can't see it so am stuck. If I can't get past this bit no other changes I want to make will be possible. What do I need to do to create a new DISKBOOT.BIN that reflects the changes I've made?

*

Offline reyalp

  • ******
  • 12004
Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #1 on: 10 / July / 2009, 20:01:42 »
I don't know about CHDK shell, but I'd suggest doing a full build by making clean before building. The makefiles are broken and don't actually notice things like header file changes.
Don't forget what the H stands for.

Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #2 on: 11 / July / 2009, 03:43:08 »
I switched to the ready to use CHDK GCC for Windows. I've done "gmake clean", "gmake PLATFORM=a590 PLATFORMSUB=101b fir", and it still doesn't recognise my changes in camera.h. I've even gone into dng.c and hardcoded the calibration illuminant field in IFO with a different value. Still no change.

I'm not a GCC expert and don't know a thing about makefiles or CHDK issues. I don't want to have to become an expert in either before I can change one line and see it reflected in the executable. Something is broken or the instructions aren't very clear on something important. After 3 days of this I'm feeling a bit frustrated.

I'm using Chromasoft's dcpTool to decompile the DNG into XML, and dnggetmatrix to show the colormatrix1 field.

I'm hoping that's enough for someone to replicate the problem or offer a solution.

*

Offline Hacki

  • ****
  • 358
  • SX100
Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #3 on: 11 / July / 2009, 04:30:16 »
Thats indeed very odd. Are you sure you're using the right diskboot.bin? After a make clean everything, including the diskboot.bin from the bin/ folder, should be deleted.

Try changing something obvious like core/gui_lang.c line 7 "Main Menu" to "FooBar" - after recompiling the caption of the main menu should be FooBar.



Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #4 on: 11 / July / 2009, 05:11:48 »
The compiler is installed to C:\CHDK\gcc\. The source is in C:\CHDK\src\. The pathname is PATH=C:\CHDK\gcc\bin;C:\CHDK\gcc\lib; with Microsoft and Borland compilers added later. I'm running Windows XP, and have Borland and Microsoft tools installed as well if that means anything.

I opened a command window in C:\CHDK\src\trunk782\ (where the source is). I ran "gmake clean" and deleted the DISKBOOT.BIN in C:\CHDK\src\trunk782\bin\. I made the suggested change to core\gui_lang.c then did "gmake PLATFORM=a590 PLATFORMSUB=101b fir". I copied the new DISKBOOT.BIN to the root directory of the memory card and booted into CHDK on the camera. The menu hasn't changed.

I just don't get this. The only thing I can think of doing is delete C:\CHDK\ and install the compiler and source again, and see if the problem still happens. Am I missing something like putting original firmware dumps somewhere or creating keys? Once these things don't work it could be anything and I don't know GCC or CHDK well enough to do more than guess.

Edit: I looked in gui_lang.o and it shows "Foo Bar" so why isn't this going into DISKBOOT.BIN?
« Last Edit: 11 / July / 2009, 05:15:33 by Pluto »

*

Offline fe50

  • ******
  • 3105
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #5 on: 11 / July / 2009, 05:55:13 »
@Pluto:
Why not using the default CHDK-Shell directory structure ?
+---archives
+---branches
+---CHDK-Shell
+---gcc
+---gcc4
\---trunk
    +---trunk300
    +---trunk775
        ....(source tree)


Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #6 on: 11 / July / 2009, 06:18:15 »
I couldn't see what that would change but I renamed the directory structure to C:\CHDK\trunk\trunk782\. No change. Same result. gui_lang.o shows "Foo Bar" instead of "Main Menu" so why isn't this going into the binary? It's like it's not properly compiling but copying a DISKBOOT.BIN from somewhere else.

I've deleted CHDK-Shell just in case that was a problem, and run "gmake clean" and "gmake PLATFORM=a590 PLATFORMSUB=101b fir" again. Copied the new DISKBOOT.BIN (its file date and time properties had updated) to the camera and loaded CHDK again. No change.

I've had a look through the makefile and found something about MAIN.BIN, dancing bits (whatever that is), and DISKBOOT.BIN. Is it possible something is going wrong here and it's copying some old version stored somewhere instead of using the latest binary? Dunno, just guessing.

Edit: Another thought. The A590 needs an encoded DISKBOOT.BIN doesn't it? Is there something going wrong because I don't have the keys. Just a wild stab in the dark.

Edit: I've gone into dng.c and modified cam_ColorMatrix1 at line 19 with a hardcoded value that's different to what's stored in camera.h. DNGGetMatrix.exe keeps returning the same values that are in camera.h not the new ones I've hardcoded. dcpTool returns values for the DNG colour matrix that look like neither. Can someone try this and see if they get the right results or if it's wrong for them as well?
« Last Edit: 11 / July / 2009, 07:58:16 by Pluto »

Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #7 on: 11 / July / 2009, 08:48:31 »
That's it. I give up. After cleaning everything again I searched through the source directory and deleted any bin files that were the same size, compiled again and tested, and got the same result. Nothing. I've spent the whole week trying to get this to work and I can't see what I'm doing wrong. It's like some big joke where everything compiles but it's secretly swapping in the old one. Oh, ha ha. Very funny.


*

Offline reyalp

  • ******
  • 12004
Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #8 on: 11 / July / 2009, 18:23:15 »
That's it. I give up. After cleaning everything again I searched through the source directory and deleted any bin files that were the same size, compiled again and tested, and got the same result. Nothing. I've spent the whole week trying to get this to work and I can't see what I'm doing wrong. It's like some big joke where everything compiles but it's secretly swapping in the old one. Oh, ha ha. Very funny.
This doesn't make any sense at all. DISKBOOT.BIN is a copy (or encoded version of for newdryos cams) bin/main.bin see top level Makefile around line 44

bin/main.bin is a copy of loader/<platform>/main.bin, possibly with 100k of zeros added.

None of this stuff has dependencies, it will all be run if you make a fir.

I have no idea what you are doing wrong, but it has to be misunderstanding or user error. Sorry.

edit:
oh, when you make clean, you have to specify your platform and sub.
Don't forget what the H stands for.

Re: CHDK-Shell compiler not updating DISKBOOT.BIN
« Reply #9 on: 12 / July / 2009, 04:11:41 »
I normally use Borland or Microsoft compilers and don't know GCC at all. Make files might as well be in Swahili. "gmake clean PLATFORM=a590 PLATFORMSUB=101b" is new to me and not in any instructions. Okay, so I ran that and it "worked". Ran another compile and the same old DISKBOOT.BIN is being created.

I've reinstalled the ready to go compiler and a single source tree, compiled, made a change in gui_lang.c and still got the same DISKBOOT.BIN. A change was reflected in gui_lang.o but it never made it to the binary file. I have no idea why and this is getting very frustrating.

Perhaps, someone needs to follow the instructions and discover what's missing or wrong about them. The compiler usage and sourcecode unpacking instructions aren't very clear. They're obviously missing things so you'll have to forgive me if I don't know the magic words or the "correct" directory structure to use.

I have no idea how to make a "fir" or what a "fir" is. If that's the bootloader I don't have the keys to make one so am using a PS.F12 from an earlier build I downloaded. The instructions for getting them is opaque to say the least. Perhaps this is where the confusion is. I have no idea.

 

Related Topics