Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

linuxstb
Monday, March 5th, 2007 at 11:23:19pm UTC 

  1. Index: bootloader/common.c
  2. ===================================================================
  3. --- bootloader/common.c (revision 12629)
  4. +++ bootloader/common.c (working copy)
  5. @@ -22,9 +22,18 @@
  6.  #include "system.h"
  7.  #include <stdarg.h>
  8.  #include <stdio.h>
  9. +#include <stdbool.h>
  10.  #include "cpu.h"
  11.  #include "common.h"
  12.  
  13. +/* TODO: Other bootloaders need to be adjusted to set this variable to true
  14. +   on a button press - currently only the ipod version does. */
  15. +#ifdef IPOD_ARCH
  16. +bool verbose = false;
  17. +#else
  18. +bool verbose = true;
  19. +#endif
  20. +
  21.  int line = 0;
  22.  #ifdef HAVE_REMOTE_LCD
  23.  int remote_line = 0;
  24. @@ -54,12 +63,14 @@
  25.      va_end(ap);
  26.  
  27.      lcd_puts(0, line++, ptr);
  28. -    lcd_update();
  29. +    if (verbose)
  30. +        lcd_update();
  31.      if(line >= LCD_HEIGHT/SYSFONT_HEIGHT)
  32.          line = 0;
  33.  #ifdef HAVE_REMOTE_LCD
  34.      lcd_remote_puts(0, remote_line++, ptr);
  35. -    lcd_remote_update();
  36. +    if (verbose)
  37. +        lcd_remote_update();
  38.      if(remote_line >= LCD_REMOTE_HEIGHT/SYSFONT_HEIGHT)
  39.          remote_line = 0;
  40.  #endif
  41. Index: bootloader/ipod.c
  42. ===================================================================
  43. --- bootloader/ipod.c   (revision 12629)
  44. +++ bootloader/ipod.c   (working copy)
  45. @@ -223,6 +223,7 @@
  46.  {
  47.      char buf[256];
  48.      int i;
  49. +    int btn;
  50.      int rc;
  51.      bool haveretailos;
  52.      bool button_was_held;
  53. @@ -278,7 +279,12 @@
  54.      button_init();
  55.  #endif
  56.  
  57. +    btn=key_pressed();
  58.  
  59. +    /* Enable bootloader messages */
  60. +    if (btn==BUTTON_RIGHT)
  61. +        verbose = true;
  62. +
  63.      lcd_setfont(FONT_SYSFIXED);
  64.  
  65.      printf("Rockbox boot loader");
  66. @@ -314,10 +320,7 @@
  67.             pinfo->type, pinfo->size / 2048);
  68.  
  69.      
  70. -    /* Check for a keypress */
  71. -    i=key_pressed();
  72. -
  73. -    if (button_was_held || (i==BUTTON_MENU)) {
  74. +    if (button_was_held || (btn==BUTTON_MENU)) {
  75.          /* If either the hold switch was on, or the Menu button was held, then
  76.             try the Apple firmware */
  77.  
  78. @@ -349,7 +352,7 @@
  79.          /* Everything failed - just loop forever */
  80.          printf("No RetailOS detected");
  81.          
  82. -    } else if (i==BUTTON_PLAY) {
  83. +    } else if (btn==BUTTON_PLAY) {
  84.          printf("Loading Linux...");
  85.          rc=load_raw_firmware(loadbuffer, "/linux.bin", MAX_LOADSIZE);
  86.          if (rc < EOK) {
  87. Index: bootloader/common.h
  88. ===================================================================
  89. --- bootloader/common.h (revision 12629)
  90. +++ bootloader/common.h (working copy)
  91. @@ -26,6 +26,9 @@
  92.  #define     EBAD_CHKSUM             -5
  93.  #define     EFILE_TOO_BIG           -6
  94.  
  95. +/* Set this to true to enable lcd_update() in the printf function */
  96. +extern bool verbose;
  97. +
  98.  /* Functions common to all bootloaders */
  99.  void reset_screen(void);
  100.  void printf(const char *format, ...);

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right worth-right