uboot-002-BootdelayEnter.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- uboot-2013.10_orig/common/main.c 2013-10-16 19:08:12.000000000 +0200
  2. +++ uboot-2013.10/common/main.c 2015-10-08 15:45:37.315543700 +0200
  3. @@ -194,7 +194,7 @@ static int abortboot_normal(int bootdela
  4. printf(CONFIG_MENUPROMPT);
  5. #else
  6. if (bootdelay >= 0)
  7. - printf("Hit any key to stop autoboot: %2d ", bootdelay);
  8. + printf("Hit ENTER key to stop autoboot: %2d ", bootdelay);
  9. #endif
  10. #if defined CONFIG_ZERO_BOOTDELAY_CHECK
  11. @@ -204,9 +204,10 @@ static int abortboot_normal(int bootdela
  12. */
  13. if (bootdelay >= 0) {
  14. if (tstc()) { /* we got a key press */
  15. - (void) getc(); /* consume input */
  16. + int in = getc(); /* consume input */
  17. puts ("\b\b\b 0");
  18. - abort = 1; /* don't auto boot */
  19. + if (in == 13)
  20. + abort = 1; /* don't auto boot */
  21. }
  22. }
  23. #endif
  24. @@ -217,12 +218,14 @@ static int abortboot_normal(int bootdela
  25. ts = get_timer(0);
  26. do {
  27. if (tstc()) { /* we got a key press */
  28. - abort = 1; /* don't auto boot */
  29. - bootdelay = 0; /* no more delay */
  30. + int in = getc(); /* consume input */
  31. +
  32. + if (in == 13) {
  33. + abort = 1; /* don't auto boot */
  34. + bootdelay = 0; /* no more delay */
  35. + }
  36. # ifdef CONFIG_MENUKEY
  37. - menukey = getc();
  38. -# else
  39. - (void) getc(); /* consume input */
  40. + menukey = in;
  41. # endif
  42. break;
  43. }