Skip to content

Commit efc3f95

Browse files
palitrini
authored andcommittedSep 24, 2022
boot: Call flush() before booting
In a lot of cases kernel resets UART HW. To ensure that U-Boot messages printed before booting the kernel are not lost, call new U-Boot console flush() function. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Simon Glass <[email protected]>
1 parent 989cc40 commit efc3f95

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed
 

‎boot/bootm_os.c

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ static void do_bootvx_fdt(bootm_headers_t *images)
303303
#else
304304
printf("## Starting vxWorks at 0x%08lx\n", (ulong)images->ep);
305305
#endif
306+
flush();
306307

307308
boot_jump_vxworks(images);
308309

‎cmd/boot.c

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
3232
addr = hextoul(argv[1], NULL);
3333

3434
printf ("## Starting application at 0x%08lX ...\n", addr);
35+
flush();
3536

3637
/*
3738
* pass address parameter as argv[0] (aka command name),

‎cmd/elf.c

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
7272
return rcode;
7373

7474
printf("## Starting application at 0x%08lx ...\n", addr);
75+
flush();
7576

7677
/*
7778
* pass address parameter as argv[0] (aka command name),
@@ -274,6 +275,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
274275
puts("## Not an ELF image, assuming binary\n");
275276

276277
printf("## Starting vxWorks at 0x%08lx ...\n", addr);
278+
flush();
277279

278280
dcache_disable();
279281
#if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI)

0 commit comments

Comments
 (0)
Please sign in to comment.