Cannot start recovery - bad boot image magic

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot start recovery - bad boot image magic

3,108 Views
krzysztofsza_ac
Contributor III

Hi!

I'm trying to run android recovery. To do this I:

- start Android normally

- exec "reboot recovery"

- u-boot detects recovery mode

Recovery command file founded!

recovery on bootdev: 8

setup env for recovery..

- trying to read recovery image from nand:

NAND read: device 0 offset 0x2000000, size 0x600000

   6291456 bytes read: OK

- but then:

booti: bad boot image magic

I had this issue long time ago, and problem was related to flashing u-boot for mmc, instead of u-boot for nand. But now, as Android starts properly, u-boot is good. So what can be other issue? My bootcmd for recovery is:

bootcmd_android_Recovery=nand read 0x12800000 0x2000000 0x600000;booti 0x1280000

While booting up normally, there are some informations from mtdparts:

Creating 4 MTD partitions on "gpmi-nand":

0x000000000000-0x000000400000 : "bootloader"

0x000000400000-0x000001400000 : "bootimg"

0x000001400000-0x000003000000 : "recovery"

0x000003000000-0x000020000000 : "root"

And when booting normally, in u-boot there is:

NAND read: device 0 offset 0x400000, size 0x1000000

16777216 bytes read: OK

kernel   @ 10808000 (4972480)

ramdisk  @ 11800000 (497048)

This corresponds to 0x000000400000-0x000001400000 : "bootimg".

So why when booting up recovery, those parameters doesn't correspond to anything? I've tried to run from u-boot:

nand read 0x12800000 0x1400000 0x1C00000;booti 0x12800000

And then something starts - it looks like normal android execution, but ends up with open android with red exclamation mark on the screen beeing displayed...

Labels (2)
0 Kudos
4 Replies

1,303 Views
krzysztofsza_ac
Contributor III

Fixed.

0 Kudos

1,303 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi,

We are glad to hear that your issue was solved. As a recommendation, it would be great if you add to your future threads the specific platform that you are using (board, BSP, device etc). In this way, there will be more chances of getting replies specifically related to your questions.

Best regards!

/Carlos

0 Kudos

1,303 Views
krzysztofsza_ac
Contributor III

Working on this, and always running recovery manually using

nand read 0x12800000 0x1400000 0x1C00000;booti 0x12800000

Found that the picture I see comes from recovery application and is shown always, when install update fails or recovery doesn't know what to do. So I thought that it's missing some commands to execute. To test this, I've made small application for OTA Update from this site How to Apply Downloaded OTA Package - Pearls in Life . App run, reboots device, device runs in recovery mode (but first it stops saying bad boot image magic, then I run recovery manually). Unfortunatelly - still nothing gets executed.

0 Kudos

1,303 Views
krzysztofsza_ac
Contributor III

So, I've fixed wrong memowy mapping in proper config files for u-boot.

Also, I've found why recovery was not starting - it was starting, but had no command. It had no command, because couldn't mount /cache partition.It couldn't because fstab was in wrong format. After changing it to proper one, recovery starts and tries to find update package. Here comes next issue - I want to place update.zip on SDCard or USB Memory. How can I make get it mounted in Recovery?

0 Kudos