Hi all,
I found the problem it is because from u-boot it is reading misc partition
from NAND and going to boot recovery mode.
int android_misc_flash_check(void) {
u32 misc_offset = 0;
char buffer[2048];
misc_offset = (u32)sunxi_partition_get_offset_byname("misc");
if(misc_offset == (u32)(-1))
{
puts("no misc partition is found\n");
return 0;
}
memset(buffer, 0, 2048);
#ifdef DEBUG
printf("misc_offset : %d\n", (int )misc_offset);
#endif
sunxi_flash_read(misc_offset, 2048/512, buffer);
memcpy(&misc_message, buffer, sizeof(misc_message));
#ifdef DEBUG
// printf("misc.command : %s\n", misc_message.command);
// printf("misc.status : %s\n", misc_message.status);
// printf("misc.recovery : %s\n", misc_message.recovery);
#endif
if(storage_type)
{
if(!strcmp(misc_message.command, "boot-recovery")) {
/* there is a recovery command */
puts("find boot recovery\n");
setenv("bootcmd", "run setargs_mmc boot_recovery");
puts("Recovery detected, will boot recovery\n");
/* android recovery will clean the misc */
}
else{
printf("bootcmd set setargs_mmc\n");
setenv("bootcmd", "run setargs_mmc boot_normal");
}
if(!strcmp(misc_message.command, "boot-fastboot")) {
/* there is a fastboot command */
setenv("bootcmd", "run setargs_mmc boot_fastboot");
puts("Fastboot detected, will enter fastboot\n");
/* clean the misc partition ourself */
memset(buffer, 0, 2048);
sunxi_flash_write(misc_offset, 2048/512, buffer);
}
}
else
{
if(!strcmp(misc_message.command, "boot-recovery")) {
/* there is a recovery command */
puts("find boot recovery\n");
setenv("bootcmd", "run setargs_nand boot_recovery");
puts("Recovery detected, will boot recovery\n");
/* android recovery will clean the misc */
}
else{
printf("bootcmd set setargs_nand\n");
setenv("bootcmd", "run setargs_nand boot_normal");
}
if(!strcmp(misc_message.command, "boot-fastboot")) {
/* there is a fastboot command */
setenv("bootcmd", "run setargs_nand boot_fastboot");
puts("Fastboot detected, will enter fastboot\n");
/* clean the misc partition ourself */
memset(buffer, 0, 2048);
sunxi_flash_write(misc_offset, 2048/512, buffer);
}
}
return 0;
}
misc_message.command is matching to boot.recovery so android boot went to
recovery mode.
but once i hard coded environment variable , the device is booting fine.
Can you say why it was so, your help will be greatly appreciable.
Regards
Punith
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.