Skip to content

Commit bad01c2

Browse files
committed
better fix for newbootargs handling
1 parent df48cd8 commit bad01c2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

arch/arm/lib/bootm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ static void do_nonsec_virt_switch(void)
209209
/* Subcommand: PREP */
210210
static void boot_prep_linux(bootm_headers_t *images)
211211
{
212-
char *commandline = getenv("bootargs");
212+
char *commandline = getenv("dtbootargs");
213213

214214
#ifdef CONFIG_OMAP4KC1
215-
if (strstr(commandline, "newbootargs"))
216-
commandline = getenv("dtbootargs");
215+
if (!strstr(commandline, "newbootargs"))
216+
commandline = getenv("bootargs");
217217
#endif
218218

219219
if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) {

common/cmd_bootm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,11 +2112,9 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
21122112
char temp[BOOT_ARGS_SIZE];
21132113
sprintf(temp, "%s %s", getenv("dtbootargs"), hdr->cmdline);
21142114
setenv("dtbootargs", temp);
2115-
sprintf(temp, "%s %s", getenv("bootargs"), hdr->cmdline);
2116-
setenv("bootargs", temp);
21172115
}
21182116

2119-
printf("bootargs @ %s\n", getenv("bootargs"));
2117+
printf("cmdline @ %s\n", hdr->cmdline);
21202118
printf("kernel @ %08x (%d)\n", hdr->kernel_addr, hdr->kernel_size);
21212119
printf("ramdisk @ %08x (%d)\n", hdr->ramdisk_addr, hdr->ramdisk_size);
21222120
printf("2nd-image @ %08x (%d)\n", hdr->second_addr, hdr->second_size);

0 commit comments

Comments
 (0)