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

Mine
Tuesday, October 16th, 2007 at 11:08:16pm UTC 

  1. Index: bootloader/main-pp.c
  2. ===================================================================
  3. --- bootloader/main-pp.c        (revision 15109)
  4. +++ bootloader/main-pp.c        (working copy)
  5. @@ -470,16 +470,18 @@
  6.      system_init();
  7.      kernel_init();
  8.      lcd_init();
  9. +   
  10. +    lcd_set_foreground(LCD_WHITE);
  11. +    lcd_set_background(LCD_BLACK);
  12. +    lcd_clear_display();
  13. +   
  14.      font_init();
  15. +    show_logo();
  16.      button_init();
  17.  #if defined(SANSA_E200)
  18.      i2c_init();
  19.      __backlight_on();
  20.  #endif
  21. -
  22. -    lcd_set_foreground(LCD_WHITE);
  23. -    lcd_set_background(LCD_BLACK);
  24. -    lcd_clear_display();
  25.      
  26.      btn = button_read_device();
  27.  #if defined(SANSA_E200) || defined(SANSA_C200)
  28. @@ -494,8 +496,10 @@
  29.          btn |= BOOTLOADER_BOOT_OF;
  30.  #endif
  31.      /* Enable bootloader messages if any button is pressed */
  32. -    if (btn)
  33. +    if (btn) {
  34. +        lcd_clear_display();
  35.          verbose = true;
  36. +    }
  37.  
  38.      lcd_setfont(FONT_SYSFIXED);
  39.  
  40. Index: bootloader/gigabeat.c
  41. ===================================================================
  42. --- bootloader/gigabeat.c       (revision 15109)
  43. +++ bootloader/gigabeat.c       (working copy)
  44. @@ -60,6 +60,7 @@
  45.      lcd_init();
  46.      backlight_init();
  47.      font_init();
  48. +    show_logo();
  49.  
  50.      lcd_setfont(FONT_SYSFIXED);
  51.  
  52. @@ -92,8 +93,10 @@
  53.      button_init();
  54.  
  55.      /* Show debug messages if button is pressed */
  56. -    if(button_read_device())
  57. +    if(button_read_device()) {
  58. +        lcd_clear_display();
  59.          verbose = true;
  60. +    }
  61.  
  62.      printf("Rockbox boot loader");
  63.      printf("Version %s", version);
  64. Index: bootloader/main.c
  65. ===================================================================
  66. --- bootloader/main.c   (revision 15109)
  67. +++ bootloader/main.c   (working copy)
  68. @@ -453,6 +453,7 @@
  69.      lcd_remote_init();
  70.  #endif
  71.      font_init();
  72. +    show_logo();
  73.  
  74.      lcd_setfont(FONT_SYSFIXED);
  75.  
  76. Index: bootloader/iaudio_x5.c
  77. ===================================================================
  78. --- bootloader/iaudio_x5.c      (revision 15109)
  79. +++ bootloader/iaudio_x5.c      (working copy)
  80. @@ -150,6 +150,8 @@
  81.  #endif
  82.      backlight_init();
  83.      font_init();
  84. +    show_logo();
  85. +   
  86.      adc_init();
  87.      button_init();
  88.  
  89. Index: bootloader/common.c
  90. ===================================================================
  91. --- bootloader/common.c (revision 15109)
  92. +++ bootloader/common.c (working copy)
  93. @@ -27,6 +27,7 @@
  94.  #include "common.h"
  95.  #include "power.h"
  96.  #include "kernel.h"
  97. +#include "rockboxlogo.h"
  98.  
  99.  /* TODO: Other bootloaders need to be adjusted to set this variable to true
  100.     on a button press - currently only the ipod, H10 and Sansa versions do. */
  101. @@ -223,6 +224,24 @@
  102.      return len;
  103.  }
  104.  
  105. +int show_logo( void )
  106. +{
  107. +    char boot_version[32];
  108. +
  109. +    snprintf(boot_version, sizeof(boot_version), "Boot Ver. %s", APPSVERSION);
  110. +
  111. +    lcd_clear_display();
  112. +    lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo);
  113. +    lcd_setfont(FONT_SYSFIXED);
  114. +    lcd_putsxy((LCD_WIDTH/2) - ((strlen(boot_version)*SYSFONT_WIDTH)/2),
  115. +               LCD_HEIGHT-SYSFONT_HEIGHT, (unsigned char *)boot_version);
  116. +
  117. +    lcd_update();
  118. +
  119. +    return 0;
  120. +}
  121. +
  122. +
  123.  /* These functions are present in the firmware library, but we reimplement
  124.     them here because the originals do a lot more than we want */
  125.  void reset_poweroff_timer(void)
  126. Index: bootloader/iriver_h300.c
  127. ===================================================================
  128. --- bootloader/iriver_h300.c    (revision 15109)
  129. +++ bootloader/iriver_h300.c    (working copy)
  130. @@ -200,6 +200,7 @@
  131.      lcd_init();
  132.      lcd_remote_init();
  133.      font_init();
  134. +    show_logo();
  135.  
  136.      lcd_setfont(FONT_SYSFIXED);
  137.  
  138. Index: bootloader/ipod.c
  139. ===================================================================
  140. --- bootloader/ipod.c   (revision 15109)
  141. +++ bootloader/ipod.c   (working copy)
  142. @@ -253,6 +253,8 @@
  143.      lcd_clear_display();
  144.  #endif
  145.  
  146. +    show_logo();
  147. +   
  148.  #if 0
  149.      /* ADC and button drivers are not yet implemented */
  150.      adc_init();
  151. @@ -262,8 +264,10 @@
  152.      btn=key_pressed();
  153.  
  154.      /* Enable bootloader messages */
  155. -    if (btn==BUTTON_RIGHT)
  156. +    if (btn==BUTTON_RIGHT) {
  157. +        lcd_clear_display();
  158.          verbose = true;
  159. +    }
  160.  
  161.      lcd_setfont(FONT_SYSFIXED);
  162.  
  163. Index: bootloader/Makefile
  164. ===================================================================
  165. --- bootloader/Makefile (revision 15109)
  166. +++ bootloader/Makefile (working copy)
  167. @@ -8,11 +8,31 @@
  168.  #
  169.  
  170.  INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR)       \
  171. - -I$(BUILDDIR)
  172. + -I$(BUILDDIR) -I$(BUILDDIR)/bitmaps
  173.  
  174.  DEPFILE = $(OBJDIR)/dep-bootloader
  175.  LDS := $(FIRMDIR)/boot.lds
  176.  
  177. +# Set up the bitmap libraries
  178. +BITMAPLIBS =
  179. +LINKBITMAPS =
  180. +ifneq ($(strip $(BMP2RB_MONO)),)
  181. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsmono.a
  182. +  LINKBITMAPS += -lbitmapsmono
  183. +endif
  184. +ifneq ($(strip $(BMP2RB_NATIVE)),)
  185. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsnative.a
  186. +  LINKBITMAPS += -lbitmapsnative
  187. +endif
  188. +ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
  189. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsremotemono.a
  190. +  LINKBITMAPS += -lbitmapsremotemono
  191. +endif
  192. +ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
  193. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsremotenative.a
  194. +  LINKBITMAPS += -lbitmapsremotenative
  195. +endif
  196. +
  197.  ifdef DEBUG
  198.      DEFINES := -DDEBUG
  199.      CFLAGS += -g
  200. @@ -47,6 +67,8 @@
  201.  all: $(BUILDDIR)/$(BINARY) $(FLASHFILE)
  202.  endif
  203.  
  204. +$(DEPFILE): $(BITMAPLIBS)
  205. +
  206.  dep: $(DEPFILE)
  207.  
  208.  $(LINKFILE): $(LDS)
  209. @@ -58,9 +80,23 @@
  210.         $(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
  211.         $(SILENT)rm $(MAXINFILE)
  212.  
  213. -$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
  214. -       $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
  215. +build-bitmapsmono:
  216. +       $(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
  217.  
  218. +build-bitmapsnative:
  219. +       $(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
  220. +
  221. +build-bitmapsremotemono:
  222. +       $(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
  223. +
  224. +build-bitmapsremotenative:
  225. +       $(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
  226. +
  227. +$(BITMAPLIBS): $(BUILDDIR)/lib%.a: build-%
  228. +
  229. +$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS)
  230. +       $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
  231. +
  232.  $(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf
  233.         $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
  234.  
  235. @@ -76,5 +112,9 @@
  236.         $(call PRINTS,cleaning bootloader)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
  237.         $(OBJDIR)/bootloader.bin $(OBJDIR)/bootloader.elf $(OBJDIR)/*.map \
  238.         $(LINKFILE) $(MAXOUTFILE) $(DEPFILE)
  239. +       $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
  240. +       $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
  241. +       $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
  242. +       $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
  243.  
  244.  -include $(DEPFILE)

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
worth-right