This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

recovery reboot is not working on omap4430 based custom board

Hello All,

When i reboot the board from recovery.img, recovery mode is not working on my board.
see the logs. 6320.crash_log_for_reboot _from_recovery.txt

I'm using the release notes http://www.omappedia.com/wiki/4AJ.2.5P1_OMAP4_Jelly_Bean_Release_Notes

In directory $mydroid/device/ti/blaze/recovery/, 2 files are there,
disable_Android.mk &
recovery_ui.c

In directory $mydroid/bootable/recovery/, all r c++ files like,
bootloader.cpp,
recovery.cpp,
default_device.cpp,
install.cpp,
roots.cpp,
screen_ui.cpp,
ui.cpp,
verifier.cpp &
verifier_test.cpp...

see the $u-boot/drivers/fastboot.c file 3343.fastboot.c
& $u-boot/common/cmd_bootm.c file 3755.cmd_bootm.c

Please help me out why this is not rebooting from the recovery.img.

with regards

-Kaushal

  • Hello Kaushal,


    It seems that your recovery image is somehow damaged/faulty and cannot reboot your device.

    Try rebuilding your recovery image and flash it again on the eMMC of your device:

    1. Make your customizations if any are necessary.

    2. Setup your environment as described in Android 4AJ.2.5.P1 release notes, that is:

    cd $MYDROID
    source build/envsetup.sh

    lunch blaze_tablet-userdebug # (for Blaze Tablet)
    lunch full_blaze-userdebug # (for Blaze)

    make recovery


    2. After that you can either
    2.1 follow this guide http://android-dls.com/wiki/index.php?title=Build_a_custom_recovery_image, from step 3 to the end.
    OR
    2.2 Reflash your device with x-loader, u-boot, kernel, android fs. But before reflashing the device format its emmc with
    ./fastboot oem format command.

    Best Regards,
    Yordan

     

  • Hi Yordan,

    Thanks for the reply.


    Actually i have added some patches for u-boot logo display. If  i remove these patches, its booting in recovery mode but the problem is with u-boot logo patches.

    see the added file details in u-boot -> ../u-boot $

    1. board/omap4430_boardi/logo.h - logo related changes
    2. board/omap4430_board/omap4430_board.c - display register related changes
    3. board/omap4430_board/panel-tc358762.h
    4. drivers/omap24xx_i2c.c - only i2c_write() changes

     int i2c_write(uchar chip, uint addr, int alen, uchar * buffer, int len)
     {
           if(chip==0x0B){

            int i;
           u16 status;
           int i2c_error = 0;
           u16 w;
           u8 tmpbuf[2] = {addr >> 8, addr & 0xff};
            if (alen > 1) {
                    printf("I2C write: addr len %d not supported\n", alen);
           if (alen > 2) {
                   printf("I2C write: addr len %d not supported\n", alen);
                     return 1;
             }
          
           if (addr + len > (1 << 16)) {
                           printf("I2C write: address 0x%x + 0x%x out of range\n",
                                           addr, len);
                           return 1;
                   }
            if (addr + len > 256) {
                    printf("I2C write: address out of range\n");
                    return 1;
            }
                   wait_for_bb();
            for (i = 0; i < len; i++) {
                    if (i2c_write_byte(chip, addr + i, buffer[i])) {
                            printf("I2C write: I/O error\n");
                            i2c_init(i2c_speed, CFG_I2C_SLAVE);
                            return 1;
                    }
            }


                   /* start address phase - will write regoffset + len bytes data */
                   /* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */
                   outw(alen + len, I2C_CNT);
                   /* set slave address */
                   outw(chip, I2C_SA);
                   /* stop bit needed here */
                   outw(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX |
                                   I2C_CON_STP, I2C_CON);

                   for (i = -alen; i < len; i++) {
                           status = wait_for_pin();
                           if (status == 0 || status & I2C_STAT_NACK) {
                                   i2c_error = 1;
                                   printf("i2c error waiting for data ACK (status=0x%x)\n",
                                                   status);
                                   goto write_exit;
                           }
                           w = (i < 0) ? tmpbuf[2+i] : buffer[i];
                           outw(w, I2C_DATA);
                           outw(I2C_STAT_XRDY, I2C_STAT);
                   }

    write_exit:
                   flush_fifo();
                   outw(0xFFFF, I2C_STAT);
                   return i2c_error;

           }
           else{
                   int i;
                   if (alen > 1) {
                           printf("I2C write: addr len %d not supported\n", alen);
                           return 1;
                   }

                   if (addr + len > 256) {
                           printf("I2C write: address out of range\n");
                           return 1;
                   }

                   for (i = 0; i < len; i++) {
                           if (i2c_write_byte(chip, addr + i, buffer[i])) {
                                   printf("I2C write: I/O error\n");
                                   i2c_init(i2c_speed, CFG_I2C_SLAVE);
                                   return 1;
                           }
                   }
           }
             return 0;
     }

    This is what i have added in if condition (Yellowish part). I think, problem is related to i2c_write() even though i'm not modifying anything in i2c_read() function. do i have to modify the i2c_read() or what ? this is totally different from recovery thing, yet it is affecting the recovery mode...

    Your reply would be very helpful for me as i'm not getting anything related to this..

  • Hello,

    Sorry for the late response (i was OoO).

    I have some clarifying questions:

    1. What board are you using? Blaze or Blaze Tablet?

    2. Are you using the prebuild recovery.img from https://gforge.ti.com/gf/download/frsrelease/1083/6581/4AJ.2.5P1_Blaze_emmc.tar.bz2 ?


    I am trying to recreate your problem, but it will take some time, since your code in i2c_write() function causes some errors, when building u-boot for my Blaze...

    Best Regards,

    Yordan

  • Hello,


    Tested your code with my OMAP4470 Blaze Board.

    At first when using the brebuild recovry.img from 4AJ.2.5P1 release the reboot recovery command was not able to boot the board. Turned out that the recovery image in https://gforge.ti.com/gf/download/frsrelease/1083/6581/4AJ.2.5P1_Blaze_emmc.tar.bz2

    is faulty (even with no modifications in i2c_write() function the board did not boot in recovery mode).

    What I did was:

     1. Take the ramdisk.img, ramdisk-recovery.img & recovery.img from 4AJ.2.5P2 (you can download them fromhttps://gforge.ti.com/gf/download/frsrelease/1103/6653/4AJ.2.5P2_Blaze_emmc.tgz) and copy them in the folder with 4AJ.2.5P1 files.

     2. Modify the u-boot accordingly with your code (since I am using OMAP4470 I changed the value in the first if statement with the correct value, which is different from 0x0B) and build the u-boot.bin

    3. Copy the modified u-boot.bin in  the folder with 4AJ.2.5P1  emmc files and flashed the Blaze. 

    The above sequence worked and I was able to boot in recovery mode.

    So in conclusion, my suggestion is to use 4AJ.2.5P2 release (http://omappedia.org/wiki/4AJ.2.5P2_OMAP4_Jelly_Bean_Release_Notes)  and make your modifications there.

    Best Regards,

    Yordan