IXUS 1000 HS Porting Thread - page 3 - DryOS Development - CHDK Forum
supplierdeeply

IXUS 1000 HS Porting Thread

  • 437 Replies
  • 95405 Views
Re: IXUS 1000 HS Porting Thread
« Reply #20 on: 20 / October / 2010, 09:39:30 »
Advertisements
I try to compile chdk

I find this

http://chdk.wikia.com/wiki/CHDK-Shell

instruction.

I have cygwin and some gcc cross compiler for diffrent CPU installed.

So i like to know, if there can some problems happen with a existing cygwin and some compilers when use the chdk shell install.

Or are the GCC compilers you build not for a cygwin enviroment ?.so it is full independent from cygwin ?
« Last Edit: 20 / October / 2010, 09:41:49 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 12105
Re: IXUS 1000 HS Porting Thread
« Reply #21 on: 20 / October / 2010, 12:01:16 »
the 3.x toolchain is mingw so it's completely independent. I believe the later ones are cygwin based, but I don't know if there's any problems using them with other cygwin stuff present.

Don't forget what the H stands for.

*

Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: IXUS 1000 HS Porting Thread
« Reply #22 on: 20 / October / 2010, 14:14:14 »
@Bernd R

The compilers used by CHDK-Shell are built under MingW/MSYS, and as such completely stand-alone.
(That is, they don't install anything in your system folders and do not change the global PATH variable)

Note that both cygwin and msys provide their own POSIX layer; I don't know how things stand at the
moment, but I haven't recently gotten any complaints about incompatibility with cygwin.

In case the cygwin layer does cause trouble, you should be able to fix it with the method described
at the bottom of this post

hope that helps,

wim

PS If you have more questions/complaints/remarks etc. about CHDK-Shell, please post them in the
     CHDK-Shell thread to avoid bloating the porting threads. TIA
« Last Edit: 20 / October / 2010, 14:29:05 by whim »

Re: IXUS 1000 HS Porting Thread
« Reply #23 on: 22 / October / 2010, 13:28:07 »
I have now chdk shell working ok on latest trunk, but i have no ixus 1000 alpha source.Can you please upload it, i try to add led on commands to find out what sourceline crash the Ixus 1000


Ixus 1000 HS


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #24 on: 23 / October / 2010, 04:52:36 »
Hi Bernd R, yes without the cam I'm a bit blind here but will try to advance,

Here you have my full trunk including the working sx210 (the port I'm using as base) and the ixus1000

http://es.drop.io/asm1989  -> sx210-ixus1000asm1989trunk958.zip

The only missing thing is fi2.inc at the root of the platform folder, you need to figure it out  with the s95 firmware dump, and reading http://chdk.setepontos.com/index.php/topic,2995.75.html ,

ixus1000 uses  d4b 

Re: IXUS 1000 HS Porting Thread
« Reply #25 on: 23 / October / 2010, 05:20:29 »
thanks for source, i try out later, is there some docu how program flow work in chdk , so i can add the first LED on command, to see if a source line is execute ?

I read in chdk docu that it use a blue led on boot.

I am not sure if the ix 1000 have a blue led.I see only 1 led on the backside and the AF LED.
The AF LED is also used for the timer blink on self images.

I see in the thread you point this text.

""""
I can confirm that a build with the "d4b" key on the S95 boots and lets me turn LED's on and off.  Changing the key slightly gives the message "Update File Error !" after selecting "Firm Update".  I assume this means my key is correct.
""""

I get the message not, so i think d4b is ok on IXus 1000 too
« Last Edit: 23 / October / 2010, 05:39:11 by Bernd R »
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #26 on: 23 / October / 2010, 11:00:15 »
I have now compile the Ixus 1000 diskboot.bin

My file

ifeq ($(KEYSYS), d4b)
FI2KEY=
FI2IV =
endif


contain nothing.
the ps.fi2 file is from your source.

I transfer my new compiled  diskboot.bin file to my sd card and do firmware update.it crash.so all work same even if i have no fi2key fi2iv.

so i need only some information where the start begin.

is it possible to enable the led or write some text to card in this function ?
file is ixus1000_sd4500/main.c

void startup()
{


   long *bss = &link_bss_start;
   long *ptr;

   // sanity check
   if ((long)&link_bss_end > (MEMISOSTART + MEMISOSIZE)){
      started();
      shutdown();
   }

   // initialize .bss senment
   while (bss<&link_bss_end)
      *bss++ = 0;
 
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #27 on: 23 / October / 2010, 16:33:28 »
Bernd R,

I recomend this readings:

In general: http://chdk.wikia.com/wiki/For_Developers

In particular, and specially for understanding boot process:
http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera

Maybe hard at first, but with several reads you will get the points

also you will need a disasembler like ida, for working with firmware dumps of this and other cameras, that will help you compare source  http://chdk.wikia.com/wiki/Loading_dump_to_IDA

ps.fi2 is needed for manual load of chdk, so yes you need at this point to find the d4b keys

since they are the same as s95 the easyiest way is to get the firmware of the s95, diasemble it or read it with a hex editor and get the correct FI2KEY and FI2IV, its better to read the full thread for understaning the process http://chdk.setepontos.com/index.php/topic,2995.75.html

if you use the ixus1000 firmware dump  fi2key is also at offset 0x7E3624, so you dont need the s95 fw
and fi2IV is at offset 0x43B71C , from the begining of the firmware

Hope it helps


« Last Edit: 24 / October / 2010, 06:31:00 by asm1989 »


Re: IXUS 1000 HS Porting Thread
« Reply #28 on: 24 / October / 2010, 09:46:13 »
some information:

I add this code in loader...../main.c

void __attribute__((noreturn)) my_restart()
{
    panic(100);

....

and the LED blink

so seem all ok now with keys, i only need search what sourceline crash by move the panic command to later sourcelines
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #29 on: 24 / October / 2010, 11:37:05 »
I find now out what fail.code is in boot.c

there seem somewhere a task create, with code at sub_FF815EE0_my.and this fail

You have written text in code before (which is execute)

*(int*)0x1934=(int)taskHook;   //needs testing
   *(int*)0x1938=(int)taskHook;
     *(int*)(0x254C)= (*(int*)0xC022010C)&1 ? 0x400000 : 0x200000; // // ASM1989 -> values for this found at: FF862AC8  ,   sx210: FF861488 in, in

how can i test that ?

here is the test function i use.strange is i cant call this function with BL panic.assembler do not find the address

#define LED_PR 0xC0220130   // -> ASM1989 08.24.2010 found at  FF91E080  in sx200 was FF8E73D0
    static void __attribute__((naked,noinline)) panic()
{
   volatile long *p=(void*)LED_PR;
   int i;
    int cnt =100;
   for(;cnt>0;cnt--){
      p[0]=0x46;

      for(i=0;i<0x200000;i++){
         asm ("nop\n");
         asm ("nop\n");
      }
      p[0]=0x44;
      for(i=0;i<0x200000;i++){
         asm ("nop\n");
         asm ("nop\n");
      }
   }
   shutdown();
}



void __attribute__((naked,noinline)) sub_FF810354_my() { // ASM1989 -> In sx200 was:  sub_FF8101A0_my


   *(int*)0x1934=(int)taskHook;   //needs testing
   *(int*)0x1938=(int)taskHook;
     *(int*)(0x254C)= (*(int*)0xC022010C)&1 ? 0x400000 : 0x200000; // // ASM1989 -> values for this found at: FF862AC8  ,   sx210: FF861488 in, in

sx200 at: FF847A08

//panic();// works

-------------------------------------------------------------

void __attribute__((naked,noinline)) sub_FF811198_my() {
     //panic(); //works
     asm volatile (

...

void __attribute__((naked,noinline)) sub_FF815EE0_my() {
      panic(); // works not
     asm volatile (
« Last Edit: 24 / October / 2010, 11:59:37 by Bernd R »
Ixus 1000 HS

 

Related Topics