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

Untitled
Monday, October 15th, 2007 at 11:02:50am UTC 

  1. Index: bootloader/main-pp.c
  2. ===================================================================
  3. --- bootloader/main-pp.c        (revision 15109)
  4. +++ bootloader/main-pp.c        (working copy)
  5. @@ -32,6 +32,7 @@
  6.  #include "button.h"
  7.  #include "disk.h"
  8.  #include "crc32-mi4.h"
  9. +#include "rockboxlogo.h"
  10.  #include <string.h>
  11.  #if defined(SANSA_E200)
  12.  #include "i2c.h"
  13. @@ -450,6 +451,23 @@
  14.  }
  15.  #endif
  16.  
  17. +int show_logo( void )
  18. +{
  19. +    char boot_version[32];
  20. +
  21. +    snprintf(boot_version, sizeof(boot_version), "Boot Ver. %s", version);
  22. +
  23. +    lcd_clear_display();
  24. +    lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo);
  25. +    lcd_setfont(FONT_SYSFIXED);
  26. +    lcd_putsxy((LCD_WIDTH/2) - ((strlen(boot_version)*SYSFONT_WIDTH)/2),
  27. +               LCD_HEIGHT-SYSFONT_HEIGHT, (unsigned char *)boot_version);
  28. +
  29. +    lcd_update();
  30. +
  31. +    return 0;
  32. +}
  33. +
  34.  void* main(void)
  35.  {
  36.      int i;
  37. @@ -471,6 +489,7 @@
  38.      kernel_init();
  39.      lcd_init();
  40.      font_init();
  41. +    show_logo();
  42.      button_init();
  43.  #if defined(SANSA_E200)
  44.      i2c_init();
  45. Index: bootloader/Makefile
  46. ===================================================================
  47. --- bootloader/Makefile (revision 15109)
  48. +++ bootloader/Makefile (working copy)
  49. @@ -8,11 +8,31 @@
  50.  #
  51.  
  52.  INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR)       \
  53. - -I$(BUILDDIR)
  54. + -I$(BUILDDIR) -I$(BUILDDIR)/bitmaps
  55.  
  56.  DEPFILE = $(OBJDIR)/dep-bootloader
  57.  LDS := $(FIRMDIR)/boot.lds
  58.  
  59. +# Set up the bitmap libraries
  60. +BITMAPLIBS =
  61. +LINKBITMAPS =
  62. +ifneq ($(strip $(BMP2RB_MONO)),)
  63. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsmono.a
  64. +  LINKBITMAPS += -lbitmapsmono
  65. +endif
  66. +ifneq ($(strip $(BMP2RB_NATIVE)),)
  67. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsnative.a
  68. +  LINKBITMAPS += -lbitmapsnative
  69. +endif
  70. +ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
  71. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsremotemono.a
  72. +  LINKBITMAPS += -lbitmapsremotemono
  73. +endif
  74. +ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
  75. +  BITMAPLIBS += $(BUILDDIR)/libbitmapsremotenative.a
  76. +  LINKBITMAPS += -lbitmapsremotenative
  77. +endif
  78. +
  79.  ifdef DEBUG
  80.      DEFINES := -DDEBUG
  81.      CFLAGS += -g
  82. @@ -47,6 +67,8 @@
  83.  all: $(BUILDDIR)/$(BINARY) $(FLASHFILE)
  84.  endif
  85.  
  86. +$(DEPFILE): $(BITMAPLIBS)
  87. +
  88.  dep: $(DEPFILE)
  89.  
  90.  $(LINKFILE): $(LDS)
  91. @@ -58,9 +80,23 @@
  92.         $(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
  93.         $(SILENT)rm $(MAXINFILE)
  94.  
  95. -$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
  96. -       $(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
  97. +build-bitmapsmono:
  98. +       $(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
  99.  
  100. +build-bitmapsnative:
  101. +       $(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
  102. +
  103. +build-bitmapsremotemono:
  104. +       $(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
  105. +
  106. +build-bitmapsremotenative:
  107. +       $(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
  108. +
  109. +$(BITMAPLIBS): $(BUILDDIR)/lib%.a: build-%
  110. +
  111. +$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS)
  112. +       $(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
  113. +
  114.  $(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf
  115.         $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
  116.  
  117. @@ -76,5 +112,9 @@
  118.         $(call PRINTS,cleaning bootloader)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
  119.         $(OBJDIR)/bootloader.bin $(OBJDIR)/bootloader.elf $(OBJDIR)/*.map \
  120.         $(LINKFILE) $(MAXOUTFILE) $(DEPFILE)
  121. +       $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
  122. +       $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
  123. +       $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
  124. +       $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
  125.  
  126.  -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