summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-01-14 17:09:07 +0800
committerYe.Li <B37916@freescale.com>2014-01-15 14:01:21 +0800
commit76b5adb221c479d6cbf4c21b8dd086e213680cf0 (patch)
tree4b89630602d5291fa73564e45768b65ca3b58666
parent372f1e0c87e1e43b4d4dac7b05ddd077aff7d24e (diff)
downloadu-boot-imx-76b5adb221c479d6cbf4c21b8dd086e213680cf0.zip
u-boot-imx-76b5adb221c479d6cbf4c21b8dd086e213680cf0.tar.gz
u-boot-imx-76b5adb221c479d6cbf4c21b8dd086e213680cf0.tar.bz2
ENGR00295163 ARM:imx6 Fix kernel halt when upgrading android to 3.10.17
The function "arch_preboot_os" is missed in booti, so ldo is not bypassed and fb is not shutdown, those cause kernel halt in booting. Meanwhile, modify the booti use "bootargs" environment to overwrite commandline in bootimg. Signed-off-by: Ye.Li <B37916@freescale.com>
-rw-r--r--common/cmd_fastboot.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index ab512bb..ef37f8e 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -1732,10 +1732,15 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif /*CONFIG_SECURE_BOOT*/
#ifdef CONFIG_CMDLINE_TAG
- /* XXX: in production, you should always use boot.img 's cmdline !!! */
- char *commandline = (char *)hdr->cmdline;
- setenv("bootargs", commandline);
+ char *commandline = getenv("bootargs");
+
+ /* If no bootargs env, just use hdr command line */
+ if (!commandline) {
+ commandline = (char *)hdr->cmdline;
+ setenv("bootargs", commandline);
+ }
+ /* XXX: in production, you should always use boot.img 's cmdline !!! */
printf("kernel cmdline:\n");
printf("\tuse boot.img ");
printf("command line:\n\t%s\n", commandline);
@@ -1757,8 +1762,11 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/*use secondary fields for fdt, second_size= fdt size, second_addr= fdt addr*/
images.ft_addr = (char *)(hdr->second_addr);
images.ft_len = (ulong)(hdr->second_size);
+ set_working_fdt_addr(images.ft_addr);
#endif /*CONFIG_OF_LIBFDT*/
+ arch_preboot_os();
+
do_bootm_linux(0, 0, NULL, &images);
puts("booti: Control returned to monitor - resetting...\n");