IXUS 170 Porting - page 3 - General Discussion and Assistance - CHDK Forum  

IXUS 170 Porting

  • 87 Replies
  • 53426 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS 170 Porting
« Reply #20 on: 01 / August / 2015, 11:13:50 »
Advertisements
Here's my attempt to make a blind port. Source only for now, you must 'make run-code-gen' to recreate the missing .c files. Copy the files to an up-to-date CHDK trunk working copy.
@H_H: you may want to compare the files to adong's ixus160 port, perhaps that will help clear things up for you.

I was assuming that the ixus160 and 170 only have the following differences:
- zoom lens: 8x vs. 12x
- image stabilization: digital vs. optical

... and left everything else unchanged (except for finding some fw addresses and variables).

Needless to say that this port
- is not complete
- may not boot at all
...

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: IXUS 170 Porting
« Reply #21 on: 02 / August / 2015, 05:57:00 »
Added the
  • IXUS 170 / ELPH 170HS 1.00A
full 8MB dump by appas from this forum post to the CHDK P&S FW dumps repository.

*

Offline appas

  • *
  • 10
    • my blog
Re: IXUS 170 Porting
« Reply #22 on: 03 / August / 2015, 18:19:26 »
Hi again!

Here's my attempt to make a blind port.

Great! Now let's see about trying it out on my camera...

Source only for now, you must 'make run-code-gen' to recreate the missing .c files. Copy the files to an up-to-date CHDK trunk working copy.

Wait wait, slow down. So I have CHDK trunk and your zip extracted within. I'm following advice from here. I have Debian Linux x86_64. Now, the provided script fails with
Quote
Found Linux OS.
Creating installation directories...
Downloading sources....
./compile.sh: line 295: cd: ./work/src: No such file or directory
******************************************************************
* Unpacking binutils-2.21.1
******************************************************************
./compile.sh: line 303: ./work/binutils-2.21.1_tar.log: No such file or directory

If I try to make CHDK, eg.
Code: [Select]
make PLATFORM=ixus170_elph170 PLATFORMSUB=100a fir, I get "make: arm-elf-gcc: Command not found", so I think I need the ARM toolchain set up first?

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS 170 Porting
« Reply #23 on: 03 / August / 2015, 18:59:36 »
Wait wait, slow down. So I have CHDK trunk and your zip extracted within. I'm following advice from here. I have Debian Linux x86_64. Now, the provided script fails with
(...)
Rather than figuring out why the script doesn't work, I'd suggest you to either install an arm-elf or arm-none-eabi toolchain (from your distribution), or download a prebuilt one.
Here's 2 arm-elf 32bit for Linux: http://forum.chdk-treff.de/download_dev.php
Here you can find arm-none-eabi binaries: https://launchpad.net/gcc-arm-embedded
If you choose a prebult one, you can extract the toolchain to a directory of your liking and add its bin directory to PATH.
You need 'OPT_USE_GCC_EABI=1' when using an arm-none-eabi toolchain.
So, here's one of my command lines as an example:
env PATH=~/bin/arm-none48/bin:$PATH make fir OPT_USE_GCC_EABI=1
You can create a file named localbuildconf.inc in the root of the CHDK working copy and put all commonly used options there (see buildconf.inc).

Before running make run-code-gen, please apply the following fix to the port's code_gen.txt:
Change
Code: [Select]
*(int*)(0x2A04 + 4) = (*(int*)0xC022F484)&5 ? 0x400000 : 0x200000;to
Code: [Select]
*(int*)(0x2A04 + 4) = (*(int*)0xC022F484)&0x20000 ? 0x400000 : 0x200000;
You may want to read the last posts in the ixus160 thread, starting here.


*

Offline appas

  • *
  • 10
    • my blog
Re: IXUS 170 Porting
« Reply #24 on: 04 / August / 2015, 08:02:07 »
I'd suggest you to either install an arm-elf or arm-none-eabi toolchain (from your distribution)

Right. In Debian, I followed these instructions. However,  I've run into trouble:

Quote
gcc-arm-linux-gnueabi : Depends: gcc-5-arm-linux-gnueabi (>= 5.2.1-14) but 5.2.1-13cross1 is installed.
 g++-arm-linux-gnueabi : Depends: g++-5-arm-linux-gnueabi (>= 5.2.1-14) but it is not going to be installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     crossbuild-essential-armel [Not Installed]         
2)     g++-arm-linux-gnueabi [Not Installed]             
3)     gcc-arm-linux-gnueabi [Not Installed]             



Accept this solution? [Y/n/q/?] n

*** No more solutions available ***

Can you help?

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS 170 Porting
« Reply #25 on: 04 / August / 2015, 18:14:29 »
However,  I've run into trouble
Well, I'm not familiar with Debian, but I don't think 'gcc-arm-linux-gnueabi' would be suitable for compiling CHDK.
I'd still recommend you to download a prebuilt toolchain.

*

Offline appas

  • *
  • 10
    • my blog
Re: IXUS 170 Porting
« Reply #26 on: 04 / August / 2015, 20:38:40 »
Ok, so I managed to get the firmware compiled. But you'll have to give me some time, because I lost my camera's charger, so I can't try it out just now. I've ordered a new one, and I'll update this topic when I've run some tests.

*

Offline appas

  • *
  • 10
    • my blog
Re: IXUS 170 Porting
« Reply #27 on: 05 / September / 2015, 06:52:34 »
Alright, got a new charger, we're back in business.

I compiled the firmware and put DISKBOOT.BIN onto the SD card. I put the card back in the camera, but I did not see a Firm update menu entry. When I renamed DISKBOOT.BIN to ps.fi2, it did (not with ps.fir), but selecting this menu option yields "Update File Error!!!".

What am I doing wrong?


*

Offline adong

  • **
  • 66
Re: IXUS 170 Porting
« Reply #28 on: 05 / September / 2015, 08:21:28 »
You cannot use a DISKBOOT.BIN file as a firmware update (because it is not). Please follow the CHDK wiki (especially the Prepare your SD card page). You should use stick utility to make your sd card bootable.

*

Offline appas

  • *
  • 10
    • my blog
Re: IXUS 170 Porting
« Reply #29 on: 05 / September / 2015, 08:28:31 »
I feel really dumb. Despite the documentation, I need some help.

Please follow the CHDK wiki (especially the Prepare your SD card page).

I was trying to follow http://chdk.wikia.com/wiki/Bootable_SD_card - is it the page you are talking about?
I am doing Bootable SD Card Method - Method 2 - Using CHDK itself to make the SD card bootable, because I am not running Windows and can therefore not use the STICK utility.
So I guess I'm at step 6. I built the firmware from CHDK trunk + the files posted ITT. What now?

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal