=== modified file 'bootloader/ipod.c' --- bootloader/ipod.c 2009-01-07 22:15:35 +0000 +++ bootloader/ipod.c 2009-01-08 16:36:58 +0000 @@ -222,6 +222,7 @@ } +#define TIMING_DONE times[3] = USEC_TIMER; verbose = true; printf("times: %d %d %d %d", times[0]/1000, times[1]/1000, times[2]/1000, times[3]/1000); sleep(20*HZ); void* main(void) { @@ -233,6 +234,9 @@ bool button_was_held; struct partinfo* pinfo; unsigned short* identify_info; + unsigned long times[4]; + + times[0] = USEC_TIMER; /* Check the button hold status as soon as possible - to give the user maximum chance to turn it off in order to @@ -273,6 +277,8 @@ printf("Version: %s", version); printf("IPOD version: 0x%08x", IPOD_HW_REVISION); + times[1] = USEC_TIMER; + i=ata_init(); if (i==0) { identify_info=ata_get_identify(); @@ -301,6 +307,8 @@ printf("Partition 1: 0x%02x %ld sectors", pinfo->type, pinfo->size); + times[2] = USEC_TIMER; + if (button_was_held || (btn==BUTTON_MENU)) { /* If either the hold switch was on, or the Menu button was held, then try the Apple firmware */ @@ -315,6 +323,7 @@ if (rc == EOK) { printf("apple_os.ipod loaded."); + TIMING_DONE return (void*)DRAM_START; } else if (rc == EFILE_NOT_FOUND) { /* If apple_os.ipod doesn't exist, then check if there is an Apple @@ -322,6 +331,7 @@ haveramos = (memcmp((void*)(DRAM_START+0x20),"portalplayer",12)==0); if (haveramos) { /* We have a copy of the retailos in RAM, lets just run it. */ + TIMING_DONE return (void*)DRAM_START; } } else if (rc < EFILE_NOT_FOUND) { @@ -348,6 +358,7 @@ rc=load_firmware(loadbuffer, BOOTFILE, MAX_LOADSIZE); if (rc == EOK) { printf("Rockbox loaded."); + TIMING_DONE return (void*)DRAM_START; } else if (rc == EFILE_NOT_FOUND) { /* if rockbox.ipod doesn't exist, then check if there is a Rockbox @@ -355,6 +366,7 @@ haveramos = (memcmp((void*)(DRAM_START+0x20),"Rockbox\1",8)==0); if (haveramos) { /* We have a copy of Rockbox in RAM, lets just run it. */ + TIMING_DONE return (void*)DRAM_START; } }