SX420 IS port - page 10 - DryOS Development - CHDK Forum
supplierdeeply

SX420 IS port

  • 95 Replies
  • 37260 Views
*

Offline blackhole

  • *****
  • 940
  • A590IS 101b
    • Planetary astrophotography
Re: SX420 IS port
« Reply #90 on: 09 / March / 2024, 14:02:11 »
Advertisements
I tried run-gen-code without problem and remake fir.
I tried the DISKBOOT.BIN but it didn't work.

I am not sure how to run DISKBOOT.BIN, I just make the card bootable with EOSCard and copy the DISKBOOT.INI on the card. Do I need other file to boot from the card?

Thanks
Can you share your source code, that's the easiest way to see what's missing?


Poslano sa mog SM-A146P koristeći Tapatalk


Re: SX420 IS port
« Reply #91 on: 09 / March / 2024, 15:05:02 »
Maybe I need an other compiler package...
Probably, CHDK requires arm-none-eabi since 1.6. The one here https://chdk.setepontos.com/index.php?topic=12752.0 should work.

If you can can post a firmware dump from your updated cam, I can help you get the port working (or just do it, it should be very quick). In any case, we a published dump to add port.

Hi Here is my PRIMARY.BIN dump https://1drv.ms/u/s!AjFXpwJgNuqR438VRDI_pQSH1wS3?e=k4mhtO

*

Offline reyalp

  • ******
  • 14082
Re: SX420 IS port
« Reply #92 on: 09 / March / 2024, 17:22:27 »
Thanks for your answer I will read your link and try run-code-gen. I checked the difference between the  stubs_entry.S and funcs_by_adddress.csv and there are a lot of difference.
Yes. Looking at funcs_by_address.csv, we see the code part of the ROM differs after 0xff16bf58  task_ImageSyncController, before ConnectPtpIPService_FW (this makes sense given the update appears related to network functionality https://www.usa.canon.com/support/canon-product-advisories/Firmware-Notice-PowerShot-SX-420-IS-Firmware-Version-1-1-0-0)
100a
Code: [Select]
0xff16bf58,task_ImageSyncController
0xff171adc,ConnectPtpIPService_FW
110a
Code: [Select]
0xff16bf58,task_ImageSyncController
0xff171b58,ConnectPtpIPService_FW
Additionally, looking at stubs_entry.S, we can see that RAM variable addresses change, somewhere after
Code: [Select]
canon_menu_active                       ,0x00003f58
and before focus_busy (0x7a**).

So in addition to rebuilding stubs_entry and running code-gen, we need to make sure anything in stubs_entry_2.s, stubs_min.S and any of the lib.c files in the changed address ranges are updated.

Notice also that MEMISOSTART has changed, so that needs to be updated in makefile.inc

Given how much has changed, you should not attempt to run a build that has not had all the affected files checked.

I tried run-gen-code without problem and remake fir.
I tried the DISKBOOT.BIN but it didn't work.
Again, it would be helpful if you explain what you mean by "didn't work". Your problem could either be that the card is not prepared properly, or that your build doesn't work. If the camera boots normally without any sign of CHDK, then it's the former. If it appears not to power on at all, it's probably the latter.

Quote
I am not sure how to run DISKBOOT.BIN, I just make the card bootable with EOSCard and copy the DISKBOOT.INI on the card. Do I need other file to boot from the card?
You need prepare the card as you would for any CHDK build, described on https://chdk.fandom.com/wiki/Prepare_your_SD_card

Your camera supports booting from FAT32, but not exFAT. If the card is larger than 32 GB, it will be formatted exFAT by default.

When using EOSCard, you need to be sure you choose the CHDK option not the EOS option. The UI is somewhat confusing.

If you have a card which was already working with the 100a build, and you have not re-formatted it or changed the boot setting with EOSCard etc, you can just copy your files to the card. Strictly you should only need the DISKBOOT.BIN and the .FLT files in CHDK/MODULES, but you can use make firzipsubcomplete to get a full build in a zip, and then unzip that onto your SD.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14082
Re: SX420 IS port
« Reply #93 on: 09 / March / 2024, 22:24:30 »
Here's my attempt at a port for sx420is 110a, mostly using ghidra version tracking.

I believe that aside from codegen and rebuilding stubs, only stubs_min.S, stubs_entry_2.s and MEMISOSTART in makefile.inc needed updating. I certainly could have made mistakes in those however  :-[

edit:
The zip includes a .FI2 file, so it should be loadable with "firm update" if your card isn't bootable, and if your card is FAT32, you can then make it bootable using CHDK.

Also it's from the 1.7 trunk rather than 1.6, but platform code differences should be minimal if any.
« Last Edit: 09 / March / 2024, 22:27:50 by reyalp »
Don't forget what the H stands for.


Re: SX420 IS port
« Reply #94 on: 10 / March / 2024, 10:05:35 »
Here's my attempt at a port for sx420is 110a, mostly using ghidra version tracking.

I believe that aside from codegen and rebuilding stubs, only stubs_min.S, stubs_entry_2.s and MEMISOSTART in makefile.inc needed updating. I certainly could have made mistakes in those however  :-[

edit:
The zip includes a .FI2 file, so it should be loadable with "firm update" if your card isn't bootable, and if your card is FAT32, you can then make it bootable using CHDK.

Also it's from the 1.7 trunk rather than 1.6, but platform code differences should be minimal if any.
Hi  :D It is working! It look so simple for you, but for me it would have taken a week. I will check your new stubs_min.S, stubs_entry_2.s to understand how we update these files. Also I prefer the firmware update method.
Thanks so much! I will be able to continue to debug my Eclipse script. Thanks again!

*

Offline reyalp

  • ******
  • 14082
Re: SX420 IS port
« Reply #95 on: 10 / March / 2024, 20:40:05 »
Hi  :D It is working! It look so simple for you, but for me it would have taken a week.  I will check your new stubs_min.S, stubs_entry_2.s to understand how we update these files.
Thanks so much! I will be able to continue to debug my Eclipse script. Thanks again!
Thanks for dumping any testing, and good luck with the eclipse :D

I've added support for firmware 110a in trunk autobuild r6269. It's currently labeled alpha. In most cases if a sub port like this boots it's OK, but any testing or bug reports are appreciated.
Don't forget what the H stands for.

 

Related Topics